Re: [csswg-drafts] [css-color-4] How to handle conversions that result in negative lightness? (#9484)

> `hsl()` has a parse-time clamp of negative saturation, when using legacy syntax. The above issue is about what to do with `hsl()` modern syntax, at parse time, where there is no interop.

But what about lightness? As specified, HSL does no clamping for lightness, but in practice browsers do clamp it as I described above.

Negative saturation is a much less critical concern for me, because (I believe) `hsl(h -s l)` is always equivalent to `HSL((h + 180) s l)` anyway.

> The reference range is used for converting percentage values to numbers. It does not imply that values outside that range are invalid.

In that case, is it a bug that the HWB conversions _don't_ round-trip accurately if the percentages are outside `[0,100]`?

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


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

Received on Monday, 12 February 2024 22:59:02 UTC