mazznoer / csscolorparser-rs

Rust CSS color parser library
Apache License 2.0
29 stars 8 forks source link

Parsing `lab` is still wrong #14

Open mazznoer opened 2 years ago

mazznoer commented 2 years ago

From https://www.w3.org/TR/css-color-4/#predefined-xyz, these are exactly equivalent:

#7654CD
rgb(46.27% 32.94% 80.39%)
lab(44.36% 36.05 -58.99)

But the test is fails for lab.

https://github.com/mazznoer/csscolorparser-rs/blob/a213f2b62388db7abf6b1dd132cda4afb77f6993/tests/parser.rs#L47-L64

gfguthrie commented 1 day ago

I was looking into this a bit & just thought I'd add that the lab calculations probably come from https://github.com/TooManyBees/lab