W3C home > Mailing lists > Public > www-style@w3.org > March 2015

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 11 Mar 2015 14:52:20 -0700
Message-ID: <CAAWBYDBqf50ssp7FJH1xw7tcjEtxZMYoOgxq-rytF=hHvs8YwQ@mail.gmail.com>
To: Andrew VanWagoner <thetalecrafter@gmail.com>
Cc: www-style list <www-style@w3.org>
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. ^_^

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

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:49 UTC