Discussion:
[css-color] "saturation" & "lightness" color adjusters under Lab
Guilherme Rios
2017-06-30 13:31:22 UTC
Permalink
Hi,

I was wondering how CSS Color Module Level 4 will deal with these color
modifications:

1. color(lab(50, 80, 67), saturation(-10%))

2. color(lch(50, 100, 40), lightness(-10%))

The problem with the first is Lab has no saturation definition. The second
is harder to explain: because "chroma" and "lightness" are not independent
from one another (CIE defines "chroma" as "colorfulness of an area judged
as a proportion of the brightness of *a similarly illuminated area* that
appears white or highly transmitting"), changes in lightness will also
affect the saturation of a color. This cannot be corrected in a color space
that does not formally define saturation, like Lab.

Would it make sense to add support to CIE Luv and its cylindrical variation
(let's call it LuvLCH so it won't be confused with the already defined LCH
from Lab)? Unlike Lab, Luv does define saturation, which might help with
both problems above.

Thanks,

Guilherme
Tab Atkins Jr.
2017-06-30 16:51:58 UTC
Permalink
Post by Guilherme Rios
Hi,
I was wondering how CSS Color Module Level 4 will deal with these color
1. color(lab(50, 80, 67), saturation(-10%))
2. color(lch(50, 100, 40), lightness(-10%))
Note - it's color-mod() now. (color() is used for colors in arbitrary
color spaces.)
Post by Guilherme Rios
The problem with the first is Lab has no saturation definition. The second
is harder to explain: because "chroma" and "lightness" are not independent
from one another (CIE defines "chroma" as "colorfulness of an area judged as
a proportion of the brightness of *a similarly illuminated area* that
appears white or highly transmitting"), changes in lightness will also
affect the saturation of a color. This cannot be corrected in a color space
that does not formally define saturation, like Lab.
Those adjusters are defined to operate in HSL/HWB space: "Sets or
adjusts the saturation, lightness, whiteness, or blackness of the base
color, when base color is interpreted as an HSL or HWB color, as
appropriate." So a Lab color is first converted into HSL or HWB, then
adjusted.
Post by Guilherme Rios
Would it make sense to add support to CIE Luv and its cylindrical variation
(let's call it LuvLCH so it won't be confused with the already defined LCH
from Lab)? Unlike Lab, Luv does define saturation, which might help with
both problems above.
Those can be brought in with a color profile for now. It won't help
with the problem you mention, tho, unless we redefine those adjusters.
^_^

~TJ

Loading...