Re: [css-color] shifting a color to make adequate contrast with another color

On Mon, Mar 9, 2015 at 8:17 PM, Andrew VanWagoner
<thetalecrafter@gmail.com> wrote:
> Yeah, that does make it quite a bit more complicated. I tried to play
> around with shifting the hue first, but the hue changes luminosity
> enough to ruin the contrast if done after, and to still runs into the
> non-monotonic problem you describe if hue shifted before.
>
> I've been working on getting contrast() from the current proposal to
> work in cssnext, hoping to get similar functionality to an
> ensure-contrast($fgColor, $bgColor) that my colleagues use in sass. I
> think contrast() still really valuable as is, and if the goal is to
> get maximum contrast, the hue of the foreground color will disappear
> anyway.
>
> I'll spend some more time playing with ideas and see if I can find
> something more concrete that makes sense.

Great!  Let me know if you come up with anything; I'm very interested. ^_^

~TJ

Received on Wednesday, 11 March 2015 21:53:09 UTC