W3C home > Mailing lists > Public > w3c-wai-gl@w3.org > April to June 2007

Re: Contrast and colour deficiency

From: Gez Lemon <gez.lemon@gmail.com>
Date: Mon, 18 Jun 2007 09:46:54 +0100
Message-ID: <e2a28a920706180146o5394e391g8716360f694c4996@mail.gmail.com>
To: "Sean Hayes" <Sean.Hayes@microsoft.com>
Cc: WCAG <w3c-wai-gl@w3.org>

Hi Sean,

> I've also been using the tool provided by Gez Lemon (although my results
> differ slightly from his, but I'm working from 0-255 sRGB, whereas he is
> working off hex numbers, so it might be a rounding error, however Gez if you
> are out there can you contact me to explain the math you are using on your
> tool, so I can figure out if I'm doing something wrong)

I'll send you the part of the script that does the calculation
off-list. It could be that I have interpreted the algorithm
incorrectly, although I seem to get closer results to you ...

> Foreground        0              0              0
> Background        207         0              47
> I get a computed ratio of 3.69 (Gez seems to get 4.1),  which is acceptable
> under our provision for 18pt text.



I get 3.67:1

> Sometimes however this works in reverse, for example red 159,0,0 text on
> green 0,255,0 background has a contrast ratio of 6.12 (5.65:1 according to
> Gez) thus passing our contrast provision at AA.



I get 6.19:1

Best regards,


Supplement your vitamins
Received on Monday, 18 June 2007 08:47:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:32:37 UTC