Class ColorCMYK
- Namespace
- ImageMagick
- Assembly
- Magick.NET-Q16-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(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, #FFFF000000000000.
ColorCMYK(ushort, ushort, ushort, ushort)
Initializes a new instance of the ColorCMYK class.
public ColorCMYK(ushort cyan, ushort magenta, ushort yellow, ushort key)
Parameters
cyan
ushortCyan component value of this color.
magenta
ushortMagenta component value of this color.
yellow
ushortYellow component value of this color.
key
ushortKey (black) component value of this color.
ColorCMYK(ushort, ushort, ushort, ushort, ushort)
Initializes a new instance of the ColorCMYK class.
public ColorCMYK(ushort cyan, ushort magenta, ushort yellow, ushort key, ushort alpha)
Parameters
cyan
ushortCyan component value of this color.
magenta
ushortMagenta component value of this color.
yellow
ushortYellow component value of this color.
key
ushortKey (black) component value of this color.
alpha
ushortAlpha component value of this color.
Properties
A
Gets or sets the alpha component value of this color.
public ushort A { get; set; }
Property Value
C
Gets or sets the cyan component value of this color.
public ushort C { get; set; }
Property Value
K
Gets or sets the key (black) component value of this color.
public ushort K { get; set; }
Property Value
M
Gets or sets the magenta component value of this color.
public ushort M { get; set; }
Property Value
Y
Gets or sets the yellow component value of this color.
public ushort Y { get; set; }
Property Value
Methods
FromMagickColor(IMagickColor<ushort>)
Converts the specified ImageMagick.IMagickColor<> to an instance of this type.
public static ColorCMYK? FromMagickColor(IMagickColor<ushort> color)
Parameters
color
IMagickColor<ushort>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.