Closed kristoferjoseph closed 10 years ago
hey! that sounds awesome. i think the best way might be to get support for hwb
included in color
? since that's the lib i was using underneath. if not that, then ideally we could just parse from hwb
at the start into something that color
recognizes and then use it still, to keep a single code path
Funny you should mention that. I have a branch in my fork of color that does just that. I'll make a PR and see if she can find it in her heart to merge it. If not can we talk more about adding it to the parser? Thanks! :love_letter:
\0/
I started to add the contrast adjuster as specified in the CSS Color Module 4 spec and realized that the parser doesn't accept hwb colors.
My reasoning for using hwb for this is it allows you to manipulate contrast while leaving the hue at the correct angle for later adjustments without requiring further conversions.
Can you give any guidance as to how you would want that added?
There is a conversion function specified in the spec here hwbToRgb that could be added to the parser if you want. Was thinking I could publish a module with just the hwb converters in it for anyone to use.
Thoughts?