diff --git a/src/ThemeEditor.Colors/CMYK.cs b/src/ThemeEditor.Colors/CMYK.cs index fe6af6d..26c9e6d 100644 --- a/src/ThemeEditor.Colors/CMYK.cs +++ b/src/ThemeEditor.Colors/CMYK.cs @@ -36,7 +36,7 @@ namespace ThemeEditor.Colors public CMYK(HSV hsv) { - CMYK cmyk = hsv.ToRGB().ToCMYK(); + CMYK cmyk = hsv.ToCMYK(); C = cmyk.C; Y = cmyk.Y; M = cmyk.M; diff --git a/src/ThemeEditor.Colors/HSV.cs b/src/ThemeEditor.Colors/HSV.cs index 5c5bca3..891a589 100644 --- a/src/ThemeEditor.Colors/HSV.cs +++ b/src/ThemeEditor.Colors/HSV.cs @@ -30,6 +30,14 @@ namespace ThemeEditor.Colors V = hsv.V; } + public HSV(CMYK cmyk) + { + HSV hsv = cmyk.ToHSV(); + H = hsv.H; + S = hsv.S; + V = hsv.V; + } + public HSV WithH(double h) => new HSV(h, S, V); public HSV WithS(double s) => new HSV(H, s, V); diff --git a/src/ThemeEditor.Colors/RGB.cs b/src/ThemeEditor.Colors/RGB.cs index 995f769..400127a 100644 --- a/src/ThemeEditor.Colors/RGB.cs +++ b/src/ThemeEditor.Colors/RGB.cs @@ -30,6 +30,14 @@ namespace ThemeEditor.Colors B = rgb.B; } + public RGB(CMYK cmyk) + { + RGB rgb = cmyk.ToRGB(); + R = rgb.R; + G = rgb.G; + B = rgb.B; + } + public RGB WithR(double r) => new RGB(r, G, B); public RGB WithG(double g) => new RGB(R, g, B);