Irregular perceptual lightness in a gradient generated with constantvalue inHSV space, with light yellows and dark blues, compared to one generated with constant lightness in Oklch.
Oklab's model is fitted with improved color appearance data: CAM16 data for lightness and chroma, and IPT data for hue. The new fit addresses issues such as unexpected hue and lightness changes in blue colors present in theCIELAB color space, simplifying the creation ofcolor schemes and smoothercolor gradients.[1][7][4]
As Ottosson explained,[1] he chose the nameOklab because the model does an OK (adequate) job and is based on the three color-space coordinatesL,a, andb.
C forchroma representing chromatic intensity, with values from 0 (achromatic) with no upper limit, but in practice not exceeding +0.5; CSS treats +0.4 as 100%[2]
Neutralgreys, pure black and the reference white are achromatic, that is,,,, andh isundefined. Assigning any real value to their hue component has no effect on conversions between color spaces.[2]
Converting fromsRGB requires first converting from sRGB to CIE XYZ with a Standard Illuminant D65. As the last step of this conversion is a linear map from linear RGB to CIE XYZ, the reference implementation directly employs themultiplied matrix representing thecomposition of the two linear maps:[1]
^The (l,m,s) space used here is not the same as theLMS color space, but rather an arbitrary space that was found numerically to best fit the color appearance data.