Re: [csswg-drafts] [css-color-4] [css-color-5] inconsistent mentions of powerless components in `white`. (#8609)

> For analogous components it would be good to verify if `a` and `b` have analogous components. For example between `lab` and `oklab`.

> As currently specified these do not

Ah, good point. Lets see: `lab(50 0 100)` is `oklab(0.564 -0.03 0.156)` while `lab(50 100 0)` is `oklab(0.603 0.316 0)` so it does seem reasonable to treat `a` and `b` as analogous.

> Chroma is powerless when lightness is 0% because any chroma value results in the exact same color (black). (And maybe the same is true of white, I forget the outcome of our conversation about this earlier.)

Once we got rid of the ill-fated attempt to deal with CIE Lightness as potentially going up to 400% then yes, the same is true of white. And we have WPT for that (which didn't get tagged with Interop2022 because it had already started, and which all browsers fail):

 - [lch-009.html](https://github.com/web-platform-tests/wpt/blob/master/css/css-color/lch-009.html) for CIE L = 100
 - [oklch-009.html](https://github.com/web-platform-tests/wpt/blob/master/css/css-color/oklch-009.html) for Ok L = 1.0
 - [lch-010.html](https://github.com/web-platform-tests/wpt/blob/master/css/css-color/lch-010.html) for CIE L = 0
 - [oklch-010.html](https://github.com/web-platform-tests/wpt/blob/master/css/css-color/oklch-010.html) for Ok L = 0

> Some edits were made but it doesn't seem that everyone agrees on these?

Firstly, it seems that [Powerless components](https://drafts.csswg.org/css-color-4/#powerless) should include the example @tab gave above with Chroma becoming powerless when Lightness is at the ends of the range.

Then, this is what the spec currently says, and it should say `powerless` for saturation/chroma (and add examples):

>  If the saturation of an HSL color is ''0%'',
 then the hue component is [=powerless=].
 If the lightness of an HSL color is ''0%'' or ''100%'',
 the hue component is [=powerless=]
 and the saturation is ''0%''.

>  If the chroma of an LCH color is ''0%'',
 the hue component is [=powerless=].
 If the lightness of an LCH color (after clamping) is ''0%'',
 or ''100%'', 
 the hue component is [=powerless=]
 and the chroma is ''0''.

>   If the chroma of an Oklch color is ''0%'' or 0,
  the hue component is [=powerless=].
  If the lightness of an Oklch color is ''0%'' or 0,
  or ''100%'' or 1.0,
  the hue component is [=powerless=]
  and the chroma is ''0''.

Lets get consensus on the spec for this aspect, then pull WPT into alignment with that.

-- 
GitHub Notification of comment by svgeesus
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8609#issuecomment-1513201576 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 18 April 2023 13:54:02 UTC