Cmyk Struct
A device CMYK color: the amounts of cyan, magenta, yellow and black inks, without color profile.
public readonly struct Cmyk : IEquatable<Cmyk>Remarks
The conversions are the naive ones of CSS Color 5 (device-cmyk()), on the encoded RGB values as they are: the black is what the three inks share (full gray component replacement), and the inks do not interact. They do not describe what a press prints: an image of CMYK samples is converted with its ICC profile (CmykConversionOptions), and colors with IccColorTransform.
The values are not validated: the conversion to RGB clips each component to [0, 1].
- Implements
Constructors
| Name | Description |
|---|---|
| Cmyk(double, double, double, double) | Initializes a new instance of the Cmyk struct. |
Cmyk(double, double, double, double)
Cmyk.csProperties
| Name | Description |
|---|---|
| C | Gets the cyan ink, from 0 to 1. |
| K | Gets the black ink, from 0 to 1. |
| M | Gets the magenta ink, from 0 to 1. |
| Y | Gets the yellow ink, from 0 to 1. |
Methods
| Name | Description |
|---|---|
| Equals(Cmyk) | Indicates whether the current object is equal to another object of the same type. |
| Equals(object?) | Indicates whether this instance and a specified object are equal. |
| FromRgb(Rgba32) | Converts an 8-bit RGB color to device CMYK. Alpha is ignored. |
| FromRgb(Rgba64) | Converts a 16-bit RGB color to device CMYK. Alpha is ignored. |
| GetHashCode() | Returns the hash code for this instance. |
| ToRgba32() | Converts this color to an opaque 8-bit RGB color, each component clipped to [0, 1]. |
| ToRgba64() | Converts this color to an opaque 16-bit RGB color, each component clipped to [0, 1]. |
| ToString() | Returns the fully qualified type name of this instance. |
GetHashCode()
Cmyk.csToRgba32()
Cmyk.csToRgba64()
Cmyk.csToString()
Cmyk.csOperators
| Name | Description |
|---|---|
| operator ==(Cmyk, Cmyk) | Compares two colors for equality, component by component. |
| operator !=(Cmyk, Cmyk) | Compares two colors for inequality, component by component. |