Re: [csswg-drafts] [css-color-4] Sample color conversion code leads to NaN values (#9477)

XYZ was designed (by the use of super-saturated, not physically realizable) to use positive numbers only. 

However, negative numbers do crop up as a result of chromatic adaptation and this is the case here: Lab uses D50 and Oklab uses D65.

> Should the LMS logic clamp channels so that they're 0 at minimum? 

In general we want to avoid clamping intermediate results.

> Should it take the cube root of the absolute value and then match the sign afterwards?

That seems a reasonable way to handle it (and is what is done for the extended transfer functions for RGB color spaces).

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


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

Received on Tuesday, 17 October 2023 16:34:39 UTC