oklab()
The oklab()
functional notation expresses a given color in the Oklab color space. Oklab represents the entire range of color that humans can see.
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>
between0%
representing black and100%
representing white.The second argument
a
is the distance along thea
axis in the Oklab colorspace.The third argument
b
is the distance along theb
axis in the Oklab colorspace.A
(alpha) can be a<number>
between0
and1
, or a<percentage>
, where the number1
corresponds to100%
(full opacity).
Specifications
Specification |
---|
CSS Color Module Level 4 # ok-lab |
Browser compatibility
BCD tables only load in the browser
See also
- A perceptual color space for image processing
- Safari Technology Preview 137 release notes: includes
oklab()
andoklch()
colors.