Re: Colour contrasts (was: WCAG2 Conformance Questions)

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 UTC