Re: [community-group] Gradient type feedback (#101)

It's a shame to see that there's no spec support for opacity stops being defined independently of colour stops. I recognise that many modern design tools don't make this easy (or even possible) either, but it's something I'd expect to be able to specify in an interchange format.

As a simplified example, if I have a gradient that blends across some number of stops (e.g. black β†’ white), and simultaneously an alpha blend with a different number of stops (e.g. from 100% β†’ 0% β†’ 100% opacity), or with stops at different locations, the final result requires all intermediate stops (in this example case middle grey) be computed at export time. That prevents these gradients from being properly round-tripped back into design software that separates these two concepts (e.g. Photoshop), and also prevents the use of colour aliases for the individual stop values.

Ideally computing all the individual distinct stop values would be a transformation step performed afterwards based on the technical capabilities of the output format (so that if some output language supported the distinction between opacity and colour stops, that could be supported by the same design token file).

[Here's an example of an online tool][1] that attempts to support computing interpolated colour stops based on independent alpha and colour stops to give you a sense of what I mean (although in practice, [CSS has issues properly representing colour stops that have zero opacity, effectively ignoring their colour][2]β€”the "correct" output can be obtained using SVG, though).

  [1]: https://www.colorzilla.com/gradient-editor/
  [2]: https://lists.w3.org/Archives/Public/www-style/2016Jan/0182.html

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


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

Received on Friday, 8 July 2022 01:08:27 UTC