Re: [csswg-drafts] [css-color-4] HTML needs an html-compatible, hex serialization of 8 bit/component sRGB colors (#10550)

It's mostly that how to invoke it from HTML is a bit ambiguous, but if the way I did it in https://github.com/whatwg/html/pull/10481 works for everyone I'm okay.

---

I found something else when testing `rgb(300 none 400)` in implementations. This becomes `#ff00ff` in Chrome and Firefox, and `rgb(255, 0, 255)` in Safari. Apparently dropping the precision for this syntax is endorsed:

> Also for compatibility, the component values are serialized in base 10, with a range of [0-255], regardless of the bit depth with which they are stored.

Maybe we should standardize on what Chrome and Firefox do here? It seems more useful if they all get serialized using the same form.

This sRGB section also doesn't address mapping "none" to 0, but it probably should?

cc @weinig 

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


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

Received on Thursday, 15 August 2024 10:33:12 UTC