Re: [community-group] Color first draft (updated) (#266)

@caoimghgin Thanks for suggesting this! At this point we **are** conforming to CSS Color Module 4, per your suggestion. So everything you’d like to accomplish will work with our current version of the proposed syntax! But at this time we’re not open to considering “just accept any CSS string” since those are famously NOT easy to parse, and it is NOT a simple regex to get the values (they support arbitrary whitespace, numbers and percentages, in many functions are very lax when it comes to commas and other characters, etc.). It’s only trivially parseable if you defined a very limited subset of what CSS allows.

But the good news is we’ve done that! We have a nearly 1:1 translation of CSS Color Module 4, just in JSON object notation form. No RegEx needed, and static JSON is much friendlier as a universal interface to every programming language. JS may make parsing, data types, and memory assignment easy, but many other languages do not and parsing CSS would be a significant technical barrier and beyond the scope of this format.

-- 
GitHub Notification of comment by drwpow
Please view or discuss this issue at https://github.com/design-tokens/community-group/pull/266#issuecomment-2763859740 using your GitHub account


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

Received on Saturday, 29 March 2025 17:36:53 UTC