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]) -
Lspecifies the CIE Lightness, and is a<percentage>between0%representing black and100%representing white.The second argument
ais the distance along theaaxis in the Lab colorspace.The third argument
bis the distance along thebaxis in the Lab colorspace.A(alpha) can be a<number>between0and1, or a<percentage>, where the number1corresponds 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.