W3C home > Mailing lists > Public > www-style@w3.org > June 2017

Re: [css-color] "saturation" & "lightness" color adjusters under Lab

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 30 Jun 2017 09:51:58 -0700
Message-ID: <CAAWBYDACkt==QOEEOsxF5q0ReMA=h5yTFC=YSMLta9BZD-hN-A@mail.gmail.com>
To: Guilherme Rios <gasrios@gmail.com>
Cc: www-style list <www-style@w3.org>
On Fri, Jun 30, 2017 at 6:31 AM, Guilherme Rios <gasrios@gmail.com> wrote:
> 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%))

Note - it's color-mod() now.  (color() is used for colors in arbitrary
color spaces.)

> 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

> 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.

Received on Friday, 30 June 2017 16:52:52 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:07 UTC