[csswg-drafts] [css-color-4] HWB (#9248)

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

== [css-color-4] HWB  ==
in [Converting HWB Colors to sRGB](https://drafts.csswg.org/css-color-4/#hwb-to-rgb), the sample code assumes that `white` and `black` are positive. It is not stated what happens if they are negative. This affects normalization (when `white` + `black` >= 100).

Negative values will not happen if sRGB color are converted to HWB but can happen if wider-gamut colors are converted to sRGB and also if specified manually.

[`color(prophoto-rgb 0 1 0)`](https://colorjs.io/apps/convert/?color=color(rec2020%200.7%200.2%200.5)&precision=4) is `rgb(88.92% -0.8% 56.2%)` which converts into HWB just fine, giving `hwb(321.87997894493725-0.799896411311526211.075823374398276)` and [converting back ](https://codepen.io/svgeesus/pen/rNoxMKL?editors=0011) to the original sRGB value complete with negative green component.

But I am concerned with things like `hwb(120 -10 100)` because -10 + 100 = 90 so it is not an achromatic color even though black is 100%.

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


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

Received on Sunday, 27 August 2023 19:25:23 UTC