Oklab
The Oklab color space: a perceptual color space for image processing.
This color space is always calculated relative to Illuminant.D65.
Component | Description | Range |
---|---|---|
L | lightness | [0, 1] |
a | green-red | [-0.4, 0.4] |
b | blue-yellow | [-0.4, 0.4] |
Constructors
Types
Default constructors for the Oklab color model.
Functions
Calculate the difference ΔEab between this color and other using the CIE 2000 recommendation.
Calculate the difference ΔEab between this color and other using the CIE 1976 recommendation.
Calculate the difference ΔEz between this color and other using the JzAzBz color space.
Return the first color with a contrast ratio exceeding the targetContrast against this color. If no color meets the target, black or white will be returned, whichever has the most contrast.
Return the first color with a contrast ratio greater or equal to the targetContrast against this color, or null
if no color meets the target.
Render this color in CSS functional notation.
Render this color in CSS functional notation if this color space is defined in the CSS standard, or return null if this color is in another color space.
Return true
if all channels of this color, when converted to sRGB, lie in the range [0, 1]
Return the color with the highest contrast ratio against this color.
Create a FloatArray containing all components of this color, with the alpha as the last component
Calculate the contrast ration of this color with other according to the Web Content Accessibility Guidelines
Calculate the relative luminance of this color according to the Web Content Accessibility Guidelines