Re: color parsing from web manifest spec

> On Apr 19, 2019, at 2:31 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> 
> You want to invoke the CSS/parse algorithm
> <https://drafts.csswg.org/css-syntax/#parse-grammar>, parsing the
> string as a <color>. You can then specify that you want the value
> canonicalized to an sRGB triple, and do what you want with it.
> 
> Note that `currentcolor` (and possibly the system colors, depending on
> the resolution of an issue we opened today) need more information
> about the element they're being used on to turn into RGB; you can
> explicitly exclude those. `device-cmyk()` can't be turned into RGB at
> all without information from the output device; you can either exclude
> that or specify that it gets "naively converted"
> <https://drafts.csswg.org/css-color/#naively-convert-from-cmyk-to-rgba>
> to RGB.

Thanks for this info - just getting back to this now. Will follow up on GitHub with a pull request to make use of the above.  

Received on Monday, 13 May 2019 04:53:58 UTC