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

Re: Colour contrasts (was: WCAG2 Conformance Questions)

From: David Woolley <forums@david-woolley.me.uk>
Date: Thu, 21 Aug 2008 23:11:18 +0100
Message-ID: <48ADE806.3060006@david-woolley.me.uk>
To: 'wai-ig list' <w3c-wai-ig@w3.org>

Peter Thiessen wrote:

> ORCA.  But as for contrast testing, an automated tool, or any sort of 
> tool would be helpful start. Or hell, even a few examples wouldn’t hurt.

What the formulae are doing is converting the image to greyscale and
then requiring a certain ratio between the absolute intensities of
adjacent shades of grey.  The numerator and demoninator are offset
slightly so that you need a significant difference at low intensities.

Unfortunately image manipulation tools don't seem to provide an sRGB to
linear conversion function, so you will need to perform a gamma
correction (mid level slider, or gamma function), then simply convert
the result to grayscale.  (sRGB isn't a gamma curve at low intensities.)

The one thing that this doesn't automate is looking the the contrasts in
the resulting grayscale image.  To this subjectively, you should first
convert back to the colour profile of your monitor.

The complexity in doing the greyscale conversion is in that it does it
reasonably accurately, whereas your image manipulation tool probably
goes straight into the weighted sum.


-- 
David Woolley
Emails are not formal business letters, whatever businesses may want.
RFC1855 says there should be an address here, but, in a world of spam,
that is no longer good advice, as archive address hiding may not work.
Received on Thursday, 21 August 2008 22:10:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 19 July 2011 18:14:28 GMT