Class ColorCMYK
- Namespace
- ImageMagick
- Assembly
- Magick.NET-Q8-AnyCPU.dll
Class that represents a CMYK color.
public sealed class ColorCMYK : ColorBase, IEquatable<ColorBase?>, IComparable<ColorBase?>
- Inheritance
-
ColorCMYK
- Implements
- Inherited Members
Constructors
ColorCMYK(Percentage, Percentage, Percentage, Percentage)
Initializes a new instance of the ColorCMYK class.
public ColorCMYK(Percentage cyan, Percentage magenta, Percentage yellow, Percentage key)
Parameters
cyan
PercentageCyan component value of this color.
magenta
PercentageMagenta component value of this color.
yellow
PercentageYellow component value of this color.
key
PercentageKey (black) component value of this color.
ColorCMYK(Percentage, Percentage, Percentage, Percentage, Percentage)
Initializes a new instance of the ColorCMYK class.
public ColorCMYK(Percentage cyan, Percentage magenta, Percentage yellow, Percentage key, Percentage alpha)
Parameters
cyan
PercentageCyan component value of this color.
magenta
PercentageMagenta component value of this color.
yellow
PercentageYellow component value of this color.
key
PercentageKey (black) component value of this color.
alpha
PercentageAlpha component value of this color.
ColorCMYK(byte, byte, byte, byte)
Initializes a new instance of the ColorCMYK class.
public ColorCMYK(byte cyan, byte magenta, byte yellow, byte key)
Parameters
cyan
byteCyan component value of this color.
magenta
byteMagenta component value of this color.
yellow
byteYellow component value of this color.
key
byteKey (black) component value of this color.
ColorCMYK(byte, byte, byte, byte, byte)
Initializes a new instance of the ColorCMYK class.
public ColorCMYK(byte cyan, byte magenta, byte yellow, byte key, byte alpha)
Parameters
cyan
byteCyan component value of this color.
magenta
byteMagenta component value of this color.
yellow
byteYellow component value of this color.
key
byteKey (black) component value of this color.
alpha
byteAlpha component value of this color.
ColorCMYK(string)
Initializes a new instance of the ColorCMYK class.
public ColorCMYK(string color)
Parameters
color
stringThe CMYK hex string or name of the color (http://www.imagemagick.org/script/color.php). For example: #F000, #FF000000.
Properties
A
Gets or sets the alpha component value of this color.
public byte A { get; set; }
Property Value
C
Gets or sets the cyan component value of this color.
public byte C { get; set; }
Property Value
K
Gets or sets the key (black) component value of this color.
public byte K { get; set; }
Property Value
M
Gets or sets the magenta component value of this color.
public byte M { get; set; }
Property Value
Y
Gets or sets the yellow component value of this color.
public byte Y { get; set; }
Property Value
Methods
FromMagickColor(IMagickColor<byte>)
Converts the specified ImageMagick.IMagickColor<> to an instance of this type.
public static ColorCMYK? FromMagickColor(IMagickColor<byte> color)
Parameters
color
IMagickColor<byte>The color to use.
Returns
Operators
explicit operator ColorCMYK?(MagickColor)
Converts the specified MagickColor to an instance of this type.
public static explicit operator ColorCMYK?(MagickColor color)
Parameters
color
MagickColorThe color to use.