Re: [csswg-drafts] [css-conditional-5][css-color] Define `style()` color comparison in more precise terms (#13157)

@jfkthame I agree the spec should at least give a specific value for `oklab`.

`0.0001` is not terrible, but a bit big for plausible float roundoff error. 

From [16.4. Serializing Oklab and OkLCh values](https://drafts.csswg.org/css-color-4/#serializing-oklab-oklch):

> The precision with which [oklab()](https://drafts.csswg.org/css-color-4/#funcdef-oklab) component values are retained, and thus the number of significant figures in the serialized value, is not defined in this specification, but due to the wide gamut must be sufficient to round-trip L values between 0 and 1 (0% and 100%), and a, b and C values between ±0.5, with at least sixteen bit precision; this will result in at least five decimal places unless trailing zeroes have been omitted.

Thus, **ε** cannot be `0.000001` because that requires six digits of precision. I therefore propose a value ten times larger, `0.00001`.

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


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

Received on Wednesday, 15 April 2026 13:20:35 UTC