Re: [community-group] Pre-defined composite type for refering color modifications (e.g. rgba) (#88)

The token JSON format that we're using at Microsoft has two uses of computed colors:

### Take a base color and overwrite its alpha value
```json
{ "Hover": { "computed": { "color": "Global.Color.AccentBase", "opacity": 0.05 } } }
```

That's virtually identical to the solutions proposed above.

### Take a base color and generate multiple tokens from it
```json
{ "Color": { "Grey": { "generate": { "type": "lightness0to100by2", "value": "#808080" } } } }
```

Both of those are pretty important for our scenarios. Our core color palette has dozens of base colors and each one of them has about ten lightness variations, and we want those variations to be expressed programmatically. For a few colors, like grey, we use far more variations. Without some way to express that programmatically, we would need to have a preprocessor that would generate a W3C token file from our "enhanced" token file: a Sass or TypeScript for tokens, effectively.

-- 
GitHub Notification of comment by TravisSpomer
Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/88#issuecomment-1005279238 using your GitHub account


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

Received on Wednesday, 5 January 2022 00:33:12 UTC