W3cubDocs

/CSS

oklab()

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

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.

Syntax

oklab(40.1% 0.1143 0.045);
oklab(59.69% 0.1007 0.1191);
oklab(59.69% 0.1007 0.1191 / .5);

Values

Functional notation: 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).

Specifications

Browser compatibility

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

See also

© 2005–2022 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklab