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

As it is right now, the contrast() adjuster only makes a color from the
base color that contrasts with the base color. It would be much more useful
to be able to shift one color to make sure it contrasts with a separate
color. And the percentage is not so useful as explicitly providing the
contrast ratio you require.

color(blue contrast(green 3)) would give you a blue-ish color that
contrasts with green at least 3:1.

The use case I have for contrast is to make sure the foreground color
contrasts with the chosen background. I could target 3:1, 4.5:1, or 7:1
depending on the needs of the current user.

Received on Saturday, 7 March 2015 17:06:41 UTC