WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Color Contrast Formula

for

From: Mark Magennis
Date: Mar 16, 2005 2:57AM


> For example, I am using rgb(153,255,51) for a font color on a
> background of rgb(204,102,204)....
>
> If I change the font color to rgb(102,204,0), I get a color
> difference value of 510

By my calculation, the difference value is 408.

max(red1,red2)-min(red1,red2) = 204 - 102 = 102
max(grn1,grn2)-min(grn1,grn2) = 204 - 102 = 102
max(blu1,blu2)-min(blu1,blu2) = 204 - 0 = 204

Am I missing something?

Mark