/// <summary> /// Converts a XYZ color to CMYK. /// </summary> /// <param name="x">The x component in the range of [0, 1].</param> /// <param name="y">The y component in the range of [0, 1].</param> /// <param name="z">The z component in the range of [0, 1].</param> /// <returns>The converted color.</returns> public static CMYK XYZtoCMYK(double x, double y, double z) { RGB rgb = XYZtoRGB(x, y, z); return(RGBtoCMYK(rgb.Red, rgb.Green, rgb.Blue)); }
/// <summary> /// Converts a XYZ color to RGB. /// </summary> /// <param name="x">The x component in the range of [0, 1].</param> /// <param name="y">The y component in the range of [0, 1].</param> /// <param name="z">The z component in the range of [0, 1].</param> /// <returns>The converted color.</returns> public static HSL XYZtoHSL(double x, double y, double z) { RGB rgb = XYZtoRGB(x, y, z); return(RGBtoHSL(rgb.Red, rgb.Green, rgb.Blue)); }
/// <summary> /// Converts a CMYK color to HSL. /// </summary> /// <param name="c">The cyan component in the range of [0, 1].</param> /// <param name="m">The magenta component in the range of [0, 1].</param> /// <param name="y">The yellow component in the range of [0, 1].</param> /// <param name="k">The black component in the range of [0, 1].</param> /// <returns>The converted color.</returns> public static HSL CMYKtoHSL(double c, double m, double y, double k) { RGB rgb = CMYKtoRGB(c, m, y, k); return(RGBtoHSL(rgb.Red, rgb.Green, rgb.Blue)); }
/// <summary> /// Converts a Lab color to XYZ. /// </summary> /// <param name="l">The l component in the range of [0, 100].</param> /// <param name="a">The a component in the range of [-128, 127].</param> /// <param name="b">The b component in the range of [-128, 127].</param> /// <returns>The converted color.</returns> public static HSL LabtoHSL(double l, double a, double b) { RGB rgb = LabtoRGB(l, a, b); return(RGBtoHSL(rgb.Red, rgb.Green, rgb.Blue)); }
/// <summary> /// Converts a Lab color to XYZ. /// </summary> /// <param name="l">The l component in the range of [0, 100].</param> /// <param name="a">The a component in the range of [-128, 127].</param> /// <param name="b">The b component in the range of [-128, 127].</param> /// <returns>The converted color.</returns> public static CMYK LabtoCMYK(double l, double a, double b) { RGB rgb = LabtoRGB(l, a, b); return(RGBtoCMYK(rgb.Red, rgb.Green, rgb.Blue)); }
/// <summary> /// Converts a HSL color to XYZ. /// </summary> /// <param name="hue">The hue component in the range of [0, 360].</param> /// <param name="saturation">The saturation component in the range of [0, 1].</param> /// <param name="lightness">The lightness component in the range of [0, 1].</param> /// <returns>The converted color.</returns> public static XYZ HSLtoXYZ(double hue, double saturation, double lightness) { RGB rgb = HSLtoRGB(hue, saturation, lightness); return(RGBtoXYZ(rgb.Red, rgb.Green, rgb.Blue)); }
/// <summary> /// Converts a HSB color to HSL. /// </summary> /// <param name="hue">The hue component in the range of [0, 360].</param> /// <param name="saturation">The saturation component in the range of [0, 1].</param> /// <param name="brightness">The brightness component in the range of [0, 1].</param> /// <returns>The converted color.</returns> public static HSL HSBtoHSL(double hue, double saturation, double brightness) { RGB rgb = HSBtoRGB(hue, saturation, brightness); return(RGBtoHSL(rgb.Red, rgb.Green, rgb.Blue)); }