Table of Contents

Struct Cmyk

Namespace
SixLabors.ImageSharp.ColorSpaces
Assembly
SixLabors.ImageSharp.dll

Represents an CMYK (cyan, magenta, yellow, keyline) color.

public readonly struct Cmyk : IEquatable<Cmyk>
Implements
Inherited Members

Constructors

Cmyk(Vector4)

Initializes a new instance of the Cmyk struct.

public Cmyk(Vector4 vector)

Parameters

vector Vector4

The vector representing the c, m, y, k components.

Cmyk(float, float, float, float)

Initializes a new instance of the Cmyk struct.

public Cmyk(float c, float m, float y, float k)

Parameters

c float

The cyan component.

m float

The magenta component.

y float

The yellow component.

k float

The keyline black component.

Properties

C

Gets the cyan color component. A value ranging between 0 and 1.

public float C { get; }

Property Value

float

K

Gets the keyline black color component. A value ranging between 0 and 1.

public float K { get; }

Property Value

float

M

Gets the magenta color component. A value ranging between 0 and 1.

public float M { get; }

Property Value

float

Y

Gets the yellow color component. A value ranging between 0 and 1.

public float Y { get; }

Property Value

float

Methods

Equals(Cmyk)

public bool Equals(Cmyk other)

Parameters

other Cmyk

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(Cmyk, Cmyk)

Compares two Cmyk objects for equality.

public static bool operator ==(Cmyk left, Cmyk right)

Parameters

left Cmyk

The Cmyk on the left side of the operand.

right Cmyk

The Cmyk on the right side of the operand.

Returns

bool

True if the current left is equal to the right parameter; otherwise, false.

operator !=(Cmyk, Cmyk)

Compares two Cmyk objects for inequality.

public static bool operator !=(Cmyk left, Cmyk right)

Parameters

left Cmyk

The Cmyk on the left side of the operand.

right Cmyk

The Cmyk on the right side of the operand.

Returns

bool

True if the current left is unequal to the right parameter; otherwise, false.