Re: [csswg-drafts] [css-color-4] Computed value and serialization of `Infinity` and `NaN` in color functions (#8629)

> @svgeesus Do you know or have an opinion on how something like `lab(50% calc(Infinity) 0)` which has an absurdly large `a` should behave?

All colors of the form `lab(50% calc((var(--n)*100) 0)` where `n` > 0 have the same (LCH) hue, and increasing chroma. Thus, even if the color itself is imaginary, the gamut mapped used value of the color should be `lab(50% x 0)` where `x` is the greatest chroma that can be displayed for that hue and lightness. I would apply the same logic to +Infinity (and -Infinity gives the opposite hue).

Where `b` is not zero, as `a` increases the contribution of `b` on the resulting hue decreases, so as `a` tends to infinity the hue tends towards `b` being effectively zero. So I guess infinite values of  either `a` or `b` make the other component powerless? And thus there are _eight_ effective hues that the color tends towards, depending on the sign of the component and whether only one, or both, have Infinity values?

-- 
GitHub Notification of comment by svgeesus
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8629#issuecomment-1513228530 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 14:11:44 UTC