Re: [community-group] Legacy color (#137)

> @jeromefarnum I think this relates to : #121 and #149
> 
> Although that issue focusses on values like `10px` the same underlying concerns also apply to other micro syntaxes like hex colors.
> 
> Since the format uses JSON it makes sense to store data in a structured way and not stringified/encoded.
> 
> This has the benefit of making it easy to manipulate a single sub-value like `alpha`. It also allows using references for each sub-value.

I could see how my request could feel related to the issues you referenced; however, I would hope that my request would be evaluated separately. 

Adding support for an `alpha` sub-value for the color token type, in my opinion, has neither a negative or positive impact on the human readability/maintainability of the spec. It is solely about providing a mechanism for composing a color token with either a tokenized or arbitrary alpha value. This is a pattern that designers and design systems use with regularity - and, removing the tokenization aspect, a pattern that all major design tools have long supported.

And unlike the unit sub-values, one would reasonably expect to encounter cases where `color` and `alpha` sub-values were composed with different values depending on their contextual use (e.g. a warning alert may compose a `colors.warning` token with `component.alert.border.alpha` and `component.alert.shadow.alpha` tokens to achieve a desired visual effect)

Conversely, I don’t think, pragmatically speaking, the same holds true for units. I’d not expect that many designers would desire to pair a `spacing.large` token with a `px` unit in one case and a `vh` unit in a sibling case within the same token theme. Similar for pairing a `duration.short` time token with `ms`, `seconds`, or `minutes` conditionally within the same token theme.

This is not to dispute the validity of those other issues - they seem like worthy discussions to have. I simply wouldn’t expect the outcomes of those discussions to have much impact on this particular matter. 

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


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

Received on Tuesday, 18 October 2022 07:42:56 UTC