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
vectorVector4The 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
cfloatThe cyan component.
mfloatThe magenta component.
yfloatThe yellow component.
kfloatThe keyline black component.
Properties
C
Gets the cyan color component.
public float C { get; }
Property Value
K
Gets the keyline black color component.
public float K { get; }
Property Value
M
Gets the magenta color component.
public float M { get; }
Property Value
Y
Gets the yellow color component.
public float Y { get; }
Property Value
Methods
Equals(Cmyk)
public bool Equals(Cmyk other)
Parameters
otherCmyk
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(Cmyk, Cmyk)
Compares two Cmyk objects for equality.
public static bool operator ==(Cmyk left, Cmyk right)
Parameters
leftCmykThe Cmyk on the left side of the operand.
rightCmykThe Cmyk on the right side of the operand.
Returns
- bool
True if the current left is equal to the
rightparameter; otherwise, false.
operator !=(Cmyk, Cmyk)
Compares two Cmyk objects for inequality.
public static bool operator !=(Cmyk left, Cmyk right)
Parameters
leftCmykThe Cmyk on the left side of the operand.
rightCmykThe Cmyk on the right side of the operand.
Returns
- bool
True if the current left is unequal to the
rightparameter; otherwise, false.