Protected Readonly_The alpha channel. Common to all color spaces.
Protected Readonly_Pointer to concrete color spaces meta-information.
Static ReadonlyMETAThe meta instance.
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.
Get 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 l component.
The l component.
Get the color lightness index. Return null if the color has no lightness component.
The component index.
Get the m component.
The m component.
Get the s component.
The s component.
Protected Static_Get the tollerance value for achromatic check.
StaticblackStaticgrayThe base gray color in this color space.Mathematical linear center (0.5). In this linear space, 0.5 represents 50% cone response intensity, which appears visually very bright (approx L* 76).
The gray color.
StaticmiddleThe base perceptual gray color in this color space. Perceptual Middle Gray (18% Gray Card). Represents the light intensity that looks "halfway gray" to the human eye. Value is approx 0.1842.
The gray color.
StatictransparentStaticwhiteThe base white color in this color space. Standard Reference White (D65). Normalized so L=1, M=1, S=1 corresponds to the white point.
The white color.
StaticwhiteClip the color to match its HDR range.
The clipped color.
Clip the color to match its SDR range.
The clipped color.
Check 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.
Set 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.
Get 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.
StaticequalsStaticfromCreate an instance from its components.
The components.
The new instance.
StaticfromCreate an instance from its JSON representation.
The JSON.
The new instance.
StaticfromStaticfromConvert XYZ components to this color space components.
The XYZ components as [x, y, z, alpha].
The color space components as [l, m, s, alpha].
StatictoConvert source components to destination components.
The source components.
The source components class definition.
The destination components class definition.
The converted components.
StatictoConvert this color space components to XYZ components.
The color space components as [l, m, s, alpha].
The XYZ components as [x, y, z, alpha].
LMS Hunt-Pointer-Estevez (D65 Normalized). "Cone Fundamental" color space. Represents the physiological response of the three kinds of human cones (Long, Medium, Short). USED in classic CVD simulation algorithms (Viénot 1999, Brettel 1997) and in chromatic adaptation (Von Kries).