The oklab() functional notation expresses a given color in the Oklab perpetual color space, which attempts to mimic how color is perceived by the human eye.
The oklab() functional notation expresses a given color in the Oklab perpetual color space, which attempts to mimic how color is perceived by the human eye.
oklab(40.1% 0.1143 0.045); oklab(59.69% 0.1007 0.1191); oklab(59.69% 0.1007 0.1191 / .5);
oklab(L a b [/ A])
L specifies the perceived lightness, and is a <percentage> between 0% representing black and 100% representing white.
The second argument a is the distance along the a axis in the Oklab colorspace.
The third argument b is the distance along the b axis in the Oklab colorspace.
A (alpha) can be a <number> between 0 and 1, or a <percentage>, where the number 1 corresponds to 100% (full opacity).
| Specification |
|---|
| CSS Color Module Level 4 # ok-lab |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
oklab |
No |
No |
No |
No |
No |
15.4 |
No |
No |
No |
No |
15.4 |
No |
oklab() and oklch() colors.