PdfColor Struct
A color in a device color space (ISO 32000-2, 8.6.4): gray, RGB or CMYK, with components from 0 to 1.
public readonly struct PdfColor : IEquatable<PdfColor>- Implements
Properties
| Name | Description |
|---|---|
| Black | Gets black, in the gray color space. |
| ColorSpace | Gets the color space. |
| White | Gets white, in the gray color space. |
Black
PdfColor.csColorSpace
PdfColor.csWhite
PdfColor.csMethods
| Name | Description |
|---|---|
| Equals(PdfColor) | 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. |
| FromCmyk(double, double, double, double) | Creates a CMYK color. |
| FromGray(double) | Creates a gray color. |
| FromRgb(double, double, double) | Creates an RGB color. |
| FromRgb24(byte, byte, byte) | Creates an RGB color from components from 0 to 255. |
| GetComponents() | Gets the components of the color: one for gray, three for RGB, four for CMYK. |
| GetHashCode() | Returns the hash code for this instance. |
| ToString() | Returns the fully qualified type name of this instance. |
FromCmyk(double, double, double, double)
PdfColor.csCreates a CMYK color.
FromGray(double)
PdfColor.csFromRgb(double, double, double)
PdfColor.csFromRgb24(byte, byte, byte)
PdfColor.csGetComponents()
PdfColor.csGets the components of the color: one for gray, three for RGB, four for CMYK.
public double[] GetComponents()Returns
double[] The components.
GetHashCode()
PdfColor.csToString()
PdfColor.csOperators
| Name | Description |
|---|---|
| operator ==(PdfColor, PdfColor) | Indicates whether two colors are equal. |
| operator !=(PdfColor, PdfColor) | Indicates whether two colors are different. |