- From: Lea Verou via GitHub <sysbot+gh@w3.org>
- Date: Tue, 11 May 2021 13:37:40 +0000
- To: public-houdini-archive@w3.org
> Yes, Typed OM needs to reflect whatever was used to construct a given color. But at the end of the day, it is being used to set and query colors; and colors have meaning, and the same actual color can be set in multiple syntactic ways and still be the same color. So there is a need for a color type. > > Colors can also be compared with other colors, and whatever syntax was used to create that pair of colors is irrelevant to that comparison operation. IMO that is one of the reasons why we *shouldn't* use CSSColorValue as a general Color object. CSSColorValue needs to reflect syntax, whereas a Color object does not. E.g. the distinction between `color(srgb 0 1 0)`, `#0f0`, and `rgb(0% 100% 0%)` is meaningless for a Color object, but needs to be preserved for the CSS OM. Nobody is complaining that we have `CSSNumericValue` in Typed OM and numbers in JS, or `CSSImageValue` in Typed OM and `Image` in JS, or `CSSResourceValue` in Typed OM and `URL` in JS. I don't see how this is any different. -- GitHub Notification of comment by LeaVerou Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/1014#issuecomment-838490976 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 11 May 2021 13:37:43 UTC