lab()
The lab()
functional notation expresses a given color in the CIE L*a*b* color space. Lab represents the entire range of color that humans can see.
Syntax
lab(29.2345% 39.3825 20.0664);
lab(52.2345% 40.1645 59.9971);
lab(52.2345% 40.1645 59.9971 / .5);
Values
- Functional notation:
lab(L a b [/ A])
-
L
specifies the CIE Lightness, and is a<percentage>
between0%
representing black and100%
representing white.The second argument
a
is the distance along thea
axis in the Lab colorspace.The third argument
b
is the distance along theb
axis in the Lab 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 # lab-colors |
Browser compatibility
BCD tables only load in the browser
See also
- LCH colors in CSS: what, why, and how?
- Safari Technology Preview 122 release notes: includes
lab()
andlch()
colors.