9 ms·
The latest CSS Color spec includes support for Lab colors in linear space. It covers all possible colors. The syntax supports decimal numbers, so you can have a
by gardaani 7y ago
The latest CSS Color spec includes support for Lab colors in linear space. It covers all possible colors. The syntax supports decimal numbers, so you can have as much precision as you want (depending how much the browser supports internally): lab(75.12321% 30.4124 -12.32434353)
In addition to supporting all colors, it also supports HDR (very bright pixels) by allowing the lightness to go above 100%. So, this is very bright red: lab(400% 80 70).
Most design software (Photoshop, Affinity Designer..) can display colors as Lab values and those can be used in CSS. Since lab colors are not intuitive for humans, CSS also supports Lch (lightness, chroma, hue), which is more human friendly.
Browser vendors are currently adding Lab support to their browsers.
https://www.w3.org/TR/css-color-4/#lab-colors https://www.w3.org/TR/css-color-4/#lab-colors
- jfkebwjsbx 7y agoThanks a lot for this answer, very informative. I was not aware of Lab coming to browsers.