[community-group] Pull Request: Color first draft (updated)

ilikescience has just submitted a new pull request for https://github.com/design-tokens/community-group:

== Color first draft (updated) ==
## Formatting and updating changes:
- Updates #147 to use the latest version of the format module
- Brings suggestions from #257 into #147 
  - Adds required colorSpace key/value
  - Adds required components key/value
  - Adds optional alpha key/value 
  - Adds optional hex key/value
- Removes gradient section altogether — gradient tokens are defined in the format module currently, so having a separate additional section would conflict with the current spec
- Keeps the naming section, but converts everything from scss to design tokens format to reduce confusion
- Reduces the size of some of the naming examples which got verbose as dtcg format
- Removes the section from naming conventions about supporting multiple color themes, as it had syntax and format that didn’t match the current spec

## Additional changes to discuss:
- Adds "supported color spaces." We haven't discussed this, but I ended up down a rabbit hole and added them. Essentially, this makes explicit what the allowed values of `colorSpace` should be: all the modes with color functions in CSS Color Module 4, plus Display P3 (supported in FIgma and most platforms) , and XYZ65 (the foundation of all other color spaces, useful as a universal interchange space).
  - I made an editorial decision to omit srgb-linear, a98-rgb, prophoto-rgb, and rec2020 from the list. I'm open to including them for parity with CSS Color Module 4, but worry that supporting these spaces and their different gamuts puts a pretty substantial burden on translation tools — of course with libraries like color.js and culori it's possible to offload this burden, but then you're taking on a dependency.
  
## Things I didn't change, but we should discuss:
- I’m not quite sure what the ‘Example of supporting multiple themes and brands in React’ section is doing, but i left it in for now.
- The ‘aliases’ section in the terminology component of the format module uses scss to discuss aliases, we should consider using dtcg format json instead.


See https://github.com/design-tokens/community-group/pull/266


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

Received on Thursday, 27 March 2025 23:57:14 UTC