ColorCMYK

References
[Serializable] public struct ColorCMYK
Represents a CMYK (Cyan, Magenta, Yellow, Key) color with double precision floating point channels. CMYK colors are used primarily in printing environments as they provide a good simulation of physical ink.

Constructors

ColorCMYK

#Since v5.0
Initializes a new instance of ColorCMYK that is equivalent to an ARGB color.
public ColorCMYK(
rgb
ARGB color to mimic.
)
Remarks: Exact conversions between color spaces are often not possible.

ColorCMYK

#Since v5.0
Initializes a new instance of ColorCMYK with custom channel values.
public ColorCMYK(
alpha,
Alpha channel value. Alpha channels are limited to the 0.0 and 1.0 range.
cyan,
Cyan channel value. Cyan channels are limited to the 0.0 and 1.0 range.
magenta,
Magenta channel value. Magenta channels are limited to the 0.0 and 1.0 range.
yellow,
Yellow channel value. Yellow channels are limited to the 0.0 and 1.0 range.
key
Key channel value. Key channels are limited to the 0.0 and 1.0 range.
)

ColorCMYK

#Since v5.0
Initializes a new instance of ColorCMYK with custom channel values.
public ColorCMYK(
cyan,
Cyan channel value. Cyan channels are limited to the 0.0 and 1.0 range.
magenta,
Magenta channel value. Magenta channels are limited to the 0.0 and 1.0 range.
yellow,
Yellow channel value. Yellow channels are limited to the 0.0 and 1.0 range.
key
Key channel value. Key channels are limited to the 0.0 and 1.0 range.
)

ColorCMYK

#Since v5.0
Initializes a new instance of ColorCMYK with custom channel values. The cyan, magenta and yellow values will be adjusted based on their combined darkness.
public ColorCMYK(
cyan,
Cyan channel hint.
magenta,
Magenta channel hint.
yellow
Yellow channel hint.
)

Properties

A

#Since v5.0
Gets or sets the Alpha channel value. Alpha channels are limited to the 0~1 range.
public double A { get; set; }

C

#Since v5.0
Gets or sets the Cyan channel value. Cyan channels are limited to the 0~1 range.
public double C { get; set; }

K

#Since v5.0
Gets or sets the Key channel value. Key channels are limited to the 0~1 range.
public double K { get; set; }

M

#Since v5.0
Gets or sets the Magenta channel value. Magenta channels are limited to the 0~1 range.
public double M { get; set; }

Y

#Since v5.0
Gets or sets the Yellow channel value. Yellow channels are limited to the 0~1 range.
public double Y { get; set; }

Methods

CreateFromHSL

#Since v5.0
Constructs the nearest CMYK equivalent of an HSL color.
public static ColorCMYK CreateFromHSL(
hsl
Target color in HSL space.
)
The CMYK equivalent of the HSL color.

CreateFromHSV

#Since v6.0
Constructs the nearest CMYK equivalent of an HSV color.
public static ColorCMYK CreateFromHSV(
hsv
Target color in HSV space.
)
The CMYK equivalent of the HSV color.

CreateFromLAB

#Since v5.0
Constructs the nearest CMYK equivalent of a LAB color.
public static ColorCMYK CreateFromLAB(
lab
Target color in LAB space.
)
The CMYK equivalent of the LAB color.

CreateFromLCH

#Since v5.0
Constructs the nearest CMYK equivalent of a LCH color.
public static ColorCMYK CreateFromLCH(
lch
Target color in LCH space.
)
The CMYK equivalent of the LCH color.

CreateFromRGBA

#Since v7.0
Create the nearest CMYK equivalent of a RGBA color.
public static ColorCMYK CreateFromRGBA(
rgba
Target color in RGBA space.
)
The CMYK equivalent of the RGBA color.

CreateFromXYZ

#Since v5.0
Constructs the nearest CMYK equivalent of an XYZ color.
public static ColorCMYK CreateFromXYZ(
xyz
Target color in XYZ space.
)
The CMYK equivalent of the XYZ color.

Convertors

OperationResultDescription
implicitColorCMYKColorImplicitly converts a CMYK color into a .Net library color.