W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > July to September 2012

Re: Color contrast between semi-transparent colors

From: Lea Verou <lea@w3.org>
Date: Thu, 6 Sep 2012 18:33:14 +0300
Cc: w3c-wai-ig@w3.org
Message-Id: <F6E17029-89A3-4807-B1A9-07BCA5CADCF3@w3.org>
To: Marc Haunschild <mh@zadi.de>
On Sep 6, 2012, at 14:48, Marc Haunschild wrote:

> Hi Lea,
> now I got it, I guess - its about how to calculate it, to change the semitransparent layer automatically to produce a satisfying contrast ratio?
Kind of. Think of it this way:
- We know the text color
- We know the (semi-transparent) background color
- We DONíT know what's going to be under that. 

We need to be able to calculate the max and min contrast ratio, so that authors can fine tune the first two colors until there is sufficient contrast regardless of what the third color will be.

> We talk about contrast in brightness, not in color, so colors do not matter, right?
Depends on what you define as brightness. It's luminance, not brightness, that affects contrast. Hue matters in luminance. For example red, i.e. hsl(0, 100%, 50%) has lower luminance than yellow, i.e. hsl(60, 100%, 50%) even though they have the same saturation and lightness in HSL or saturation and brightness in HSV.

> Maybe it is enough to add the values for red, green and blue to find out the brightness of the text?
No, that is not how it works, since red, green and blue do not equally contribute to brightness.
Received on Thursday, 6 September 2012 15:33:27 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:45 UTC