[csswg-drafts] [css-color-4] Expand the concept of analogous components to analogous _sets_ of components to minimize `none` → `0` conversions (#10210)

LeaVerou has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color-4] Expand the concept of analogous components to analogous _sets_ of components to minimize `none` → `0` conversions ==
_(This came out of my comment here: https://github.com/w3c/csswg-drafts/issues/10151#issuecomment-2052685363 )_

Currently, css-color-4 defines that [`none` values will be carried forward to analogous components](https://drafts.csswg.org/css-color-4/#interpolation). Basically, even when converting to different color spaces, if there are [analogous components](https://drafts.csswg.org/css-color-4/#analogous-components), they will become `none`.

Essentially what this does, is attempt to divide the components into rough sets of dependencies and try to preserve author intent as much as possible. 
Sure, they’re not entirely orthogonal, and e.g. tweaking hue in HSL does affect chroma and lightness in oklch, but it's the lesser of two evils, the other evil being converting `none` to `0`. 

To that goal, I can see a few improvements we can make to minimize `none` → `0` conversions even more:
1. Instead of analogous components, word the prose around analogous _sets_ of components. The current analogous components are just sets of size 1. 
2. If two color spaces have analogous components, the components _remaining_ after you remove all analogous components, are an analogous set. Meaning, if Lab L is analogous to OKLch L, this means Lab a,b are analogous to OKLCh c, h., so converting e.g. `oklch(50% none none)` to `lab` yields `lab(42 none none)`.
3. The set of all components is analogous in every color space (basically #10203 )

Not sure if this can be considered editorial, or we'd need WG resolution. @svgeesus ?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10210 using your GitHub account


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

Received on Monday, 15 April 2024 19:21:42 UTC