[community-group] Color: Allow Aliases to be used for `colorSpace`, `components`, and `alpha` values (#271)

michaelurban has just created a new issue for https://github.com/design-tokens/community-group:

== Color: Allow Aliases to be used for `colorSpace`, `components`, and `alpha` values ==
Example:

```
{
  "primitive": {
    "colors": {
      "$type": "oklchComponents|colorComponents",
      "oklch": {
        "black": [0, 0, 0],
        "white": [1, 0, 0]
      }
    }
  },
  "semantic": {
    "state": {
      "none": 0,
      "hover": 0.06,
      "drag": 0.09
    },
    "color": {
      "$type": "color",
      "$colorSpace": "oklch", // <- Nice to have, colorSpace alpha to all colors
      //"$alpha": <alpha value|alias>, // <- Nice to have, apply alpha to all colors
      "overlay": {
        "primary": {
          "hover": {
            "$value": {
              "components": "{primitive.colors.oklch.white}", // <-!!! Allow alias for components value
              "alpha": "{semantic.state.hover}" // <-!!! Allow alias for alpha value
            }
          },
          "drag": {
            "$value": {
              "components": "{primitive.colors.oklch.white}",
              "alpha": "{semantic.state.drag}"
            }
          }
        },
        "secondary": {
          "hover": {
            "$value": {
              "components": "{primitive.colors.oklch.black}",
              "alpha": "{semantic.state.hover}"
            }
          },
          "drag": {
            "$value": {
              "components": "{primitive.colors.oklch.black}",
              "alpha": "{semantic.state.drag}"
            }
          }
        }
      }
    }
  }
}
```

Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/271 using your GitHub account


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

Received on Wednesday, 7 May 2025 07:03:43 UTC