Re: [csswg-drafts] [css-color-4][css-color-5] rgb-to-hwb algorithm disagrees indirectly with relative-color-out-of-gamut and color-mix-out-of-gamut expectations (#10695)

Starting from CSS Color 4  [rgbToHSL](https://github.com/w3c/csswg-drafts/blob/main/css-color-4/rgbToHsl.js) and removing the negative saturation check, to create an rgbToHue, I end up with

```js
case red:   hue = (green - blue) / d + (green < blue ? 6 : 0); break;
```

while the codepen from @squelart  has

```js
case red:   hue = (green - blue) / d; break;
```

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


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

Received on Wednesday, 7 August 2024 01:05:33 UTC