Struct Cmyk
Represents an CMYK (cyan, magenta, yellow, keyline) color.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.ColorSpaces
Assembly: SixLabors.ImageSharp.dll
Syntax
public readonly struct Cmyk : IEquatable<Cmyk>
Constructors
| Edit this page View SourceCmyk(Vector4)
Initializes a new instance of the Cmyk struct.
Declaration
public Cmyk(Vector4 vector)
Parameters
Type | Name | Description |
---|---|---|
Vector4 | vector | The vector representing the c, m, y, k components. |
Cmyk(float, float, float, float)
Initializes a new instance of the Cmyk struct.
Declaration
public Cmyk(float c, float m, float y, float k)
Parameters
Type | Name | Description |
---|---|---|
float | c | The cyan component. |
float | m | The magenta component. |
float | y | The yellow component. |
float | k | The keyline black component. |
Properties
| Edit this page View SourceC
Gets the cyan color component.
Declaration
public float C { get; }
Property Value
Type | Description |
---|---|
float |
K
Gets the keyline black color component.
Declaration
public float K { get; }
Property Value
Type | Description |
---|---|
float |
M
Gets the magenta color component.
Declaration
public float M { get; }
Property Value
Type | Description |
---|---|
float |
Y
Gets the yellow color component.
Declaration
public float Y { get; }
Property Value
Type | Description |
---|---|
float |
Methods
| Edit this page View SourceEquals(Cmyk)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(Cmyk other)
Parameters
Type | Name | Description |
---|---|---|
Cmyk | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
Equals(object?)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current instance. |
Returns
Type | Description |
---|---|
bool | true if |
Overrides
| Edit this page View SourceGetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
| Edit this page View SourceToString()
Returns the fully qualified type name of this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The fully qualified type name. |
Overrides
Operators
| Edit this page View Sourceoperator ==(Cmyk, Cmyk)
Compares two Cmyk objects for equality.
Declaration
public static bool operator ==(Cmyk left, Cmyk right)
Parameters
Type | Name | Description |
---|---|---|
Cmyk | left | The Cmyk on the left side of the operand. |
Cmyk | right | The Cmyk on the right side of the operand. |
Returns
Type | Description |
---|---|
bool | True if the current left is equal to the |
operator !=(Cmyk, Cmyk)
Compares two Cmyk objects for inequality.
Declaration
public static bool operator !=(Cmyk left, Cmyk right)
Parameters
Type | Name | Description |
---|---|---|
Cmyk | left | The Cmyk on the left side of the operand. |
Cmyk | right | The Cmyk on the right side of the operand. |
Returns
Type | Description |
---|---|
bool | True if the current left is unequal to the |