Table of Contents

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 Percentage

Cyan component value of this color.

magenta Percentage

Magenta component value of this color.

yellow Percentage

Yellow component value of this color.

key Percentage

Key (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 Percentage

Cyan component value of this color.

magenta Percentage

Magenta component value of this color.

yellow Percentage

Yellow component value of this color.

key Percentage

Key (black) component value of this color.

alpha Percentage

Alpha 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 byte

Cyan component value of this color.

magenta byte

Magenta component value of this color.

yellow byte

Yellow component value of this color.

key byte

Key (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 byte

Cyan component value of this color.

magenta byte

Magenta component value of this color.

yellow byte

Yellow component value of this color.

key byte

Key (black) component value of this color.

alpha byte

Alpha component value of this color.

ColorCMYK(string)

Initializes a new instance of the ColorCMYK class.

public ColorCMYK(string color)

Parameters

color string

The 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

byte

C

Gets or sets the cyan component value of this color.

public byte C { get; set; }

Property Value

byte

K

Gets or sets the key (black) component value of this color.

public byte K { get; set; }

Property Value

byte

M

Gets or sets the magenta component value of this color.

public byte M { get; set; }

Property Value

byte

Y

Gets or sets the yellow component value of this color.

public byte Y { get; set; }

Property Value

byte

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

ColorCMYK

A ColorCMYK instance.

Operators

explicit operator ColorCMYK?(MagickColor)

Converts the specified MagickColor to an instance of this type.

public static explicit operator ColorCMYK?(MagickColor color)

Parameters

color MagickColor

The color to use.

Returns

ColorCMYK

A ColorCMYK instance.