Re: [csswg-drafts] [css-color-5] Consider using the same identifiers for color-adjust() and relative color syntax (#6142)

> Ah, so the reason I initially wrote `color-adjust()` 

@una [proposed it](https://gist.github.com/una/edcfa0d3600e0b89b2ebf266bf549721) and [specced it](https://github.com/w3c/csswg-drafts/commit/0101c5a65b15cf68498a65ff505911360f866ea5). I think what you are referring to is the old `color-mod()` but `color-adjust()` is not really based on that.

> to use the more verbose words was because it wants to auto-detect the colorspace in use, so the adjusters need to be unique, or at least shared only by spaces that give them the same meaning. If we do as you suggest in #6141 and make the adjustment colorspace required, then this is no longer necessary, and we can have, say, `b` represent blue (rgb), black (hwb), and "b" (Lab) simultaneously, since it's no longer ambiguous.

Please note that we are making the color space mandatory **for now**. Eventually, the goal was to be able to omit it, although autodetecting it from the component names sounds suboptimal as well, so maybe we should keep it mandatory.

Another reason to use more verbose names in `color-adjust()`: by design, you only need to specify the coordinates you are modifying, whereas for RCS you need to specify all components, even those that remain unchanged, so brevity is more important.
I am indifferent about changing the names in `color-adjust()`, but would oppose using more verbose names in RCS because that would render it a huge pain to use.

> (Tangent, but actually I think I made a mistake anyway; HSL and LCH/Lab lightness _aren't_ identical, right? hsl(0 0% 50%) is RGB 50% gray, but lch(50% 0 0) is _not_.)

👀
_The whole point_ of Lab/LCH is that they are not identical! 50% HSL lightness doesn't reflect 50% perceptual lightness, even despite gamma correction, which brings it much closer than it would be with linear RGB. See also [this example](https://drafts.csswg.org/css-color-4/#ex-hsl-sucks) from the spec.

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


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

Received on Monday, 29 March 2021 04:54:01 UTC