Re: [community-group] High contrast colors (#91)

First off, I really like this idea. I agree that we should expand our `color` type to allow some form of system color keywords.

Design tokens are platform-agnostic. As far as our spec is concerned, I believe that means it should allow people to express the broadest range of possible values for a given type. However, where different platforms use different keywords / syntax to express the _same_ value, I don't think that means that our format needs to allow all of them. Quite the opposite in fact. IMHO having lots of different ways to say the same thing just makes the format harder to learn and creates more complexity for implementors.

It is the job of export tools like StyleDictionary or Theo to translate tokens in DTCG format files into what ever the target platform equivalents are. Or to substitute an sensible fallback value if a platform doesn't support something. 

In this case, it seems CSS, WinUI and perhaps other platforms that have some notion of system colors use different names for them. For our spec we could invent our own set of system color keywords and provide some examples to show how they map to the CSS or WinUI equivalents. But, where an established standard exists, we may as well copy that. I'm therefore in favour of @TravisSpomer's proposal to just use the CSS system color keywords.

If at some point it turns out that some platforms have a wider range of system colors than what CSS covers, there's nothing stopping us expanding our set accordingly. Just because we start by copying something like CSS, doesn't necessarily mean we need to be constrained by that forever more.

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


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

Received on Saturday, 8 January 2022 00:13:23 UTC