ColorCMYK

References
public struct ColorCMYK : IEquatable<ColorCMYK>
Represents a color in the CMYK color model.
Remarks: This is a helper class to handle CMYK colors. Whenever a color is used it must be converted to a Color struct first, either by using ToColor() or the implicit conversion.

Constructors

ColorCMYK

#
public ColorCMYK(Color color)
Initializes a new instance of the ColorCMYK with the specified RGB Color

ColorCMYK

#
public ColorCMYK(float cyan, float magenta, float yellow, float black, float alpha = 1)
Initializes a new instance of the ColorCMYK class
cyan (float)Cyan component
magenta (float)Magenta component
yellow (float)Yellow component
black (float)Key/black component
alpha (float = 1)Alpha component

Properties

Methods

Distance

#
public static float Distance(ColorCMYK value1, ColorCMYK value2)
Calculates the 'distance' of two CMYK colors
Remarks: This is useful for comparing two different color values to determine if they are similar. Typically though, ColorHSL.Distance(ColorHSL, ColorHSL) gives the best result instead of this method.
value1 (ColorCMYK)First color to compare
value2 (ColorCMYK)Second color to compare
The overall distance/difference between the two colours. A lower value indicates a closer match

Equals

#
public bool Equals(ColorCMYK other)
Returns a value indicating that this is equal to the specified color
other (ColorCMYK)ColorCMYK to compare with
True if the colours are equal, false otherwise

Equals

#
public override bool Equals(object obj)
Returns a value indicating that this is equal to the specified object
obj (object)object to compare with
true if the colours are equal, false otherwise
ValueType.Equals

Operators

OperationResultDescription
ColorCMYK==ColorCMYKboolCompares two colors for equality
ColorCMYK!=ColorCMYKboolCompares two colors for inequality

Convertors

OperationResultDescription
implicitColorCMYKColorConverts this instance to an ARGB color value
implicitColorColorCMYKConverts this an ARGB color value to a CMYK value