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
Vector4The 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
floatThe cyan component.
m
floatThe magenta component.
y
floatThe yellow component.
k
floatThe 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
other
Cmyk
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
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
left
CmykThe Cmyk on the left side of the operand.
right
CmykThe 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
CmykThe Cmyk on the left side of the operand.
right
CmykThe Cmyk on the right side of the operand.
Returns
- bool
True if the current left is unequal to the
right
parameter; otherwise, false.