Re: [community-group] Loosen up the color type (#79)

@Shrinks99 I fully agree and have been advocating for exactly that for months.
I personally don't see the point in hex support. But the counter argument has been that everyone uses hex today and that there are concerns that tools won't implement the design token file format because it is too much work to handle color values.

That is why I started my previous comment with : 

> If there are still concerns that hex is required to gain adoption it could be an option to have a single value definition that has optional subfields?

-------

> Colourspace information is not an option when defining colours. It is a requirement. The value of RGB = 0.5 is unknowable without this information. Is it in sRGB, Display-P3, linearized sRGB? You can make a guess but there is no way of knowing what colour "0.5" represents without a colourspace value being defined. Even with hex codes!

This is incorrect.
The specification can define hex rgb as `srgb` only.
This is how it works in CSS/browsers.

There is no need to add a color space keyword with each hex value if the specification requires that any hex is interpreted as `srgb`.

This makes this token valid :

```json
{
  "foo": {
    "$type": "color",
    "$value": {
      "hex": "#000"
    }
  }
}
```

It is a little bit more work to type than :

```json
{
  "foo": {
    "$type": "color",
    "$value": "#000"
  }
}
```

But it still adheres to the principle that design tokens files should be easy to edit by humans : https://github.com/design-tokens/community-group/issues/149

It is definitely easier than writing 16 bit per channel, wide gamut color values.

I don't personally agree with this principle but I try to follow it when making suggestions.


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


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

Received on Tuesday, 7 February 2023 16:21:58 UTC