[csswg-drafts] [css-color-4] Converting out of gamut colors to `hsl` can result in negative saturation (#9222)

romainmenke has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color-4] Converting out of gamut colors to `hsl` can result in negative saturation ==
https://github.com/w3c/csswg-drafts/blob/61da22ed62e83bf41caa5bde73912209ff45cc2e/css-color-4/rgbToHsl.js#L16

```
rgbToHsl(1.5, 1, 1)
// (3) [0, -100, 125]
```

If I clamp saturation to `0` I get better results.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9222 using your GitHub account


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

Received on Tuesday, 22 August 2023 21:18:46 UTC