E-mail List Archives
Re: Color Contrast Formula
From: Michael D. Roush
Date: Mar 15, 2005 10:27AM
- Next message: John Foliot - WATS.ca: "Love him or Hate him - Jacob's got some good info this week!"
- Previous message: Andrew Kirkpatrick: "Re: Color Contrast Formula"
- Next message in Thread: Mark Magennis: "Re: Color Contrast Formula"
- Previous message in Thread: Andrew Kirkpatrick: "Re: Color Contrast Formula"
- View all messages in this Thread
tim.harshbarger.cqwg wrote:
> http://www.w3.org/TR/AERT#color-contrast
>
> The color brightness formula seems straightforward. We are not so
> certain about the color difference formula. What is meant by max and
> min values?
I've always understood it to mean the larger and smaller of the 'red
values' in the two colors that are being compared. The formula
max(red1,red2)-min(red1,red2) might also be understood as "The absolute
value of the difference between red1 and red2", or even simpler
"Subtract the smaller one from the larger one".
For example, I am using rgb(153,255,51) for a font color on a background
of rgb(204,102,204)....
max(red1,red2)-min(red1,red2) = 204 - 153 = 51
max(grn1,grn2)-min(grn1,grn2) = 255 - 102 = 153
max(blu1,blu2)-min(blu1,blu2) = 204 - 51 = 153
51 + 153 + 153 = 357 (Quite a bit below the 500 standard.)
If I change the font color to rgb(102,204,0), I get a color difference
value of 510, just above what I need to satisfy the formula.
Now, the example I just gave was intentional. I find both of these
terribly hard to read. I find the 'passable' example even more
difficult than the one that doesn't pass the formula.
Moral of the story.... keep the 500 number in mind as a guide if you
wish, but don't rely on a 500+ score to guarantee good color contrast.
Of course, that's if I'm understanding their formula right....
Michael Roush
<EMAIL REMOVED>
- Next message: John Foliot - WATS.ca: "Love him or Hate him - Jacob's got some good info this week!"
- Previous message: Andrew Kirkpatrick: "Re: Color Contrast Formula"
- Next message in Thread: Mark Magennis: "Re: Color Contrast Formula"
- Previous message in Thread: Andrew Kirkpatrick: "Re: Color Contrast Formula"
- View all messages in this Thread