A colour: a colour space and one number per component, as a colour operator sets it; for the Pattern colour space, also the pattern. A value type with its components stored inline, so setting a colour allocates nothing.
public readonly struct PdfColor : IEquatable<PdfColor>
ISO 32000-2 §8.6.2 (colour values), §8.6.8 (colour operators, Table 73) and §8.7.3 (patterns). The components are kept as the
content stream gave them; conversion (PdfColorConverter) clips each into its component's range. The colour space is
the one the operator selected: a DefaultRGB resource replaces DeviceRGB only when the colour is painted (§8.6.5.6), through
PdfDefaultColorSpaces.
A colour in the Pattern colour space names its pattern (PatternName, Pattern) and carries the matrix of the content stream that named it (PatternMatrix), the space the pattern matrix maps into (§8.7.2); for an uncoloured tiling pattern the components are in the underlying colour space (§8.7.3.3).
kind:method, kind:property, kind:ctor. Press Esc to clear.PdfColor(PdfColorSpace, ReadOnlySpan<Single>)Initializes a new instance of the PdfColor struct.MaxComponentsThe most components a colour stores; a DeviceN colour space with more is painted through its alternate.ColorSpaceGets the colour space; DeviceGray for a default instance.ComponentCountGets the number of components.ComponentsGets the component values.Item[Int32]Gets the value of component index.PatternGets the pattern dictionary or stream the name resolved to, or null when there is none.PatternMatrixGets the matrix of the content stream in which the pattern was selected (its CTM at the start of that stream), which the pattern matrix maps pattern space into; the identity for colours that are not patterns.PatternNameGets the name of the pattern in the Pattern subdictionary of the resources, for a Pattern colour.FromCmyk(Single, Single, Single, Single)Returns a DeviceCMYK colour.FromGray(Single)Returns a DeviceGray colour.FromRgb(Single, Single, Single)Returns a DeviceRGB colour.Equality(PdfColor, PdfColor)Compares two colours by space, components and pattern.Inequality(PdfColor, PdfColor)Compares two colours by space, components and pattern.