AbstractProtected Readonly_The alpha channel. Common to all color spaces.
Protected Readonly_Pointer to concrete color spaces meta-information.
Get the alpha channel.
The value.
Get the color chroma index. Return null if the color has no chroma component.
The component index.
Get the color space name.
The color space name.
AbstractcomponentsGet the color components as an array of values.
The last element is always the alpha channel.
The other components follow the color space name, e.g.
RGB: [R, G, B, alpha].
The component values.
Get the color hue index. Return null if the color has no hue component (i.e. it is not cylindrical).
The component index.
Get the color lightness index. Return null if the color has no lightness component.
The component index.
Protected Static_Get the tollerance value for achromatic check.
Clip the color to match its HDR range.
The clipped color.
Clip the color to match its SDR range.
The clipped color.
AbstractisCheck whether the color is achromatic. I.e. almost white/black/gray.
Trus if the color is achromatic.
Check whether the color is in a specific color space.
The color space.
True if this is in the color space.
Check whether the color is in a specific color space.
The color space name.
True if this is in the color space.
Check whether the color respects its color space boundaries for HDR.
The check result.
Check whether the color respects its color space boundaries for SDR.
The check result.
Set the alpha component.
The new value.
The new instance with the alpha changed.
AbstractsetSet the component vlaues.
The last one is always the alpha channel.
The other components follow the color space name, e.g.
RGB: [R, G, B, alpha].
The values to set.
A new instance of the target color space.
Converts this color to any other color space.
The class constructor of the target space (e.g., Rgb, Oklch).
A new instance of the target color space.
AbstracttoAbstracttoGet the chroma component value. Return null if the color has no chroma component.
The chroma value.
Get the hue component value. Return null if the color has no hue component.
The hue value.
Get the lightness component value. Return null if the color has no lightness component.
The lightness value.
Set the chroma component value. If null is passed, nothing is done.
The new chroma value.
A new instance of the target color space.
Set the hue component value. If null is passed, nothing is done.
The new hue value.
A new instance of the target color space.
Set the lightness component value. If null is passed, nothing is done.
The new lightness value.
A new instance of the target color space.
StaticequalsStatictoConvert source components to destination components.
The source components.
The source components class definition.
The destination components class definition.
The converted components.
Abstract Base Class for all color spaces. Provides shared functionality for conversion, mixing, manipulation, and analysis (DeltaE, WCAG contrast, Tone Mapping, etc.).