Table of Contents

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 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(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, #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 ushort

Cyan component value of this color.

magenta ushort

Magenta component value of this color.

yellow ushort

Yellow component value of this color.

key ushort

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

Cyan component value of this color.

magenta ushort

Magenta component value of this color.

yellow ushort

Yellow component value of this color.

key ushort

Key (black) component value of this color.

alpha ushort

Alpha component value of this color.

Properties

A

Gets or sets the alpha component value of this color.

public ushort A { get; set; }

Property Value

ushort

C

Gets or sets the cyan component value of this color.

public ushort C { get; set; }

Property Value

ushort

K

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

public ushort K { get; set; }

Property Value

ushort

M

Gets or sets the magenta component value of this color.

public ushort M { get; set; }

Property Value

ushort

Y

Gets or sets the yellow component value of this color.

public ushort Y { get; set; }

Property Value

ushort

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

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.