Re: [csswg-drafts] [css-color-4] Do gradients/animations using lab/lch colors interpolate in the Lab colorspace? (#4647)

Okay, so the request is for some math that achieves:

* When transitioning between equal chroma, linear hue transition.
* When transition to zero chroma, hue remains exactly on the non-zero color.
* No discontinuity between the two cases, so nearly-zero chroma stays on the high-chroma hue for most of the transition.
* Zero chroma, specifically, is the important bit here, not just "large differences of chroma" - transitioning from C=200 to C=100 should have a linear (or very near linear) hue transition, from going from C=100 to C=0 should be abrupt.
* The flipover from "basically linear hue transition" to "basically the high-chroma color's hue thruout" should occur at a point where you can't really see the hue anyway, so this probably requires fine-tuning.

Hmm, I'd have to play with the math a bit to see it, but I suspect what I'm asking for is a sigmoid function, tuned so that the flipover is roughly where you stop being able to easily see the hue. The output of the sigmoid tells you how much the midpoint of the hue transition should deviate from the actual midpoint, using the same "midpoint" mechanics as gradient transitions today.

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

Received on Wednesday, 6 May 2020 17:39:43 UTC