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: Fri, 7 Sep 2012 21:58:47 +0300
Cc: w3c-wai-ig@w3.org
Message-Id: <6F4CA696-55CB-417E-B99B-F2910B91AF32@w3.org>
To: Phill Jenkins <pjenkins@us.ibm.com>
On Sep 7, 2012, at 19:00, Phill Jenkins wrote:

> Marc said: 
> "You have a background and a foreground and you use a semi transparent 
> layer between them. So just make sure (if text is dark) that the darkest 
> possible background (black) will be still bright enough to produce a 
> satisfying contrast ratio.
> Or use a semi transparent layer which darkens even a white background so 
> that you can use a white font. If the font should be not white, you must 
> darken the background even more...
> Marc" 
> and Lea said: 
> "I've started another thread about variable color backgrounds [1]. We cannot assume that just because the background is semi-transparent, it will be overlaid over a variable color background. For example, many designers use semi-transparent white or black on top of solid colors, to create lighter and darker variants while still being able to change the base color with one edit.
> [1]: http://lists.w3.org/Archives/Public/w3c-wai-ig/2012JulSep/0329.html
> Lea Verou" 
This wasn't a reply to Marc. I was replying to David Woolley, as evidenced by the quote below my message and the greeting "Hi David". Not sure why you thought I was replying to Marc (and confused me at first as well) or what point you are trying to make by quoting these excerpts.

> The question I think that needs to be asked and answered  is who is the "you"?  in other words, what is or should be the role of the user agent vs the responsibility of the developer? 
> I believe the user agent should be able to change the middle "semi-transparent layer" to imporve contrast accessibility.  If user agents can already "turn off" images, why not also be able to place a 'semi-transparent layer' if one doesn't exist, or re-place the one with a darker or lighter one.  Again my point being that desired solution belongs with the user agent and the responsibility of the developer is to enable it.   
If the semi-transparent layer has the wrong color, it could result to low contrast even when converted to opaque. I agree that user agents should have a way to increase contrast though. However, I think web authors should have metrics and algorithms to help them make their content accessible first-hand, so that such UA settings have to be used sparingly. In other words, I disagree that it's *solely* a UA responsibility.

> Also, is there a grey color that at some point can be contrasted with either white or black background and achieve the same contrast level either way?  And did WCAG 2.0 minimum contrast level of 3.5 to 1 then in effect prohibit certain grey fonts becasue they can't achieve the minimum level?
hsl(0,0%,46%) produces the same contrast (4.6) with both white and black. This contrast ratio passes WCAG AA for any size text and WCAG AAA for large text.
Also, the minimum contrast level is not 3.5:1, but 3:1 for large text and 4.5:1 for any text (AA level).
Received on Friday, 7 September 2012 18:58:57 UTC

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