News for hackers. Stuff that matters.
Re:Wide Gamut Color in CSS with Display-P3 by gardaani on Tuesday March 03, 2020 @03:59AM (#22472947)
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

Re:Wide Gamut Color in CSS with Display-P3 by jfkebwjsbx on Wednesday March 04, 2020 @06:58AM (#22482991)
Thanks a lot for this answer, very informative. I was not aware of Lab coming to browsers.