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

>  I think what you are referring to is the old color-mod()

Ah yeah, I am. They're closely related, tho; see <https://drafts.csswg.org/date/2017-10-11T14:48:05/css-color-4/#modifying-colors> which is very similar in overall syntax.

> but color-adjust() is not really based on that.

It is, in fact; Una's proposal came out of discussions between her, me, and Adam Argyle about this topic, based on my earlier attempts in the space, and I believe the proposal was based directly off of reading my older proposal and modifying it to have less ()-nesting. I pushed for Una to handle spec edits as a nice First Spec to work on (and to make sure I wasn't overly burdened with Yet Another Spec to work on ^_^).

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

We should def make that decision *now*, since as shown here it'll influence the optimal names.

I agree, tho, that auto-detecting the colorspace from the used channel names isn't a great strategy, and so just keeping it mandatory is probably the right idea, particularly since that aligns it with the other color-modifying functions. Consistency is good, even if some usages could conceivably be simpler.

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

Right. ^_^ So yeah, that *definitely* throws `lightness` as a reasonable name out the window; we'd have to name them `hsl-lightness` and `lch-lightness` and `lab-lightness`, and at that point, ugh, just let me say I'm working in `lab` and use a nice short `l`. If we add more spaces, these sorts of clashes between similarly-named channels will only increase; iirc "chroma" isn't too uncommon across multiple spaces either, and generally has a space-specific definition.

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


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

Received on Tuesday, 30 March 2021 18:32:37 UTC