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 cb component.
The cb component.
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 cr component.
The cr component.
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.
Get the y component.
The y component.
Protected Static_Get the tollerance value for achromatic check.
StaticblackThe base black color in this color space. Standard Black. Y=0 (Darkness), Cb=128, Cr=128 (Neutral Chroma).
The black color.
StaticgrayThe base gray color in this color space. Mathematical center of Luma (Y=128). Cb and Cr are kept at 128 (Achromatic).
The gray color.
StaticmiddleThe base perceptual gray color in this color space. Perceptual Middle Gray (L* = 50). Since Y is usually calculated from Gamma-Corrected RGB, the value matches Rgb.middleGray (~119).
The gray color.
StatictransparentThe base transparent color in this color space. Transparent Black. Y=0, Chroma Neutral, Alpha=0.
The transparent color.
StaticwhiteThe base white color in this color space. Standard White. Y=255 (Full Brightness), Cb=128, Cr=128 (Neutral Chroma).
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 [y, cb, cr, 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 [y, cb, cr, alpha].
The XYZ components as [x, y, z, alpha].
YCbCr (Standard Rec.709 - Full Range). Color space used for video and image encoding (e.g., JPEG). Separates Luma (Y) from Chroma (Blue-diff Cb, Red-diff Cr). Useful for compression and edge detection algorithms.
Ranges (Internal - Full Range):