Re: [csswg-drafts] [css-color] Computing lch/lab to srgb with lightness = 0% or 100% (#8794)

> [`color(srgb 1 1 1`)](https://colorjs.io/apps/convert/?color=color(srgb%201%201%201)&precision=6) is, to 6 significant figures, still `color(prophoto-rgb 1 1 1)` and to full precision the coordinates are `[0.9999999886663737, 1.0000000327777285, 0.9999999636791804]`.
> 
> [`color(srgb 1 1 1`)](https://colorjs.io/apps/convert/?color=color(srgb%201%201%201)&precision=6) is, to 6 significant figures, `lab(100 0 0.00001)` or to full precision `[00.00000139649632, -0.000007807961277528364, 0.000006766250648659877]` and in LCH it is `lch(100 0.00001 none)` or to full precision `[0.9999999934735462, 3.727399553519285e-8, NaN]`.

This inaccuracy is due to a less precise Bradford inverse matrix.  I go into more details here: https://github.com/LeaVerou/color.js/pull/352#issuecomment-1815848444. I plan to issue a PR for color.js when I get a chance.

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


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

Received on Friday, 17 November 2023 07:14:51 UTC