Re: [csswg-drafts] [css-color-4] Achromatic colors converted to hue-ish spaces should treat hue as "missing", not NaN (#6107)

> Are you really wanting to argue that `hsl(calc(0deg/0), ...)` should be treated as an achromatic color? Like, that's intentionally something you desire for this function? 

No. That is your model of "the only way `NaN` can occur", not mine. Mine is 

```js
let gray = new Color("Lab" [50, 0.00001, 0.00002]);
let angle = gray.to("LCH").hue;
```

> CSS already has a way of indicating non-double values (namely, a keyword).

As I already said:

>> Obviously it can be represented textually in CSS syntax, or in the (string-based) CSS OM

and as I (meant to) continue

>> but how can it be represented in Typed OM or a Color API or when being passed back and forth between CSS and JS?

On the observability of the value

>>  No, it is caused by colorspace conversion regardless of whether you plan to interpolate it

> Sure, but all such conversions are censored away into a color with a hue before authors see it, right?

You keep stating this. No. Why would it? The spec is already very clear that some cylindrical polar color representations have an undefined hue. You seem to believe that it is censored away into +infinity which then becomes, I dunno, 360?


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


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

Received on Saturday, 20 March 2021 02:44:26 UTC