Colour Contrast: what about opacity?

We have discussed some weeks ago about colour contrast. I'm working with
JuicyStudio for optimize the CSS testing tool [1] for test also
attributes [2].

* Colour Brightness Formula
The following is the formula suggested by the World Wide Web Consortium
(W3C) to determine the brightness of a colour.

((Red value X 299) + (Green value X 587) + (Blue value X 114)) / 1000

The difference between the background brightness, and the foreground
brightness should be greater than 125.


* Colour Difference Formula
The following is the formula suggested by the W3C to determine the
difference between two colours.

(maximum (Red value 1, Red value 2) - minimum (Red value 1, Red value
2)) + (maximum (Green value 1, Green value 2) - minimum (Green value 1,
Green value 2)) + (maximum (Blue value 1, Blue value 2) - minimum (Blue
value 1, Blue value 2))

The difference between the background colour and the foreground colour
should be greater than 500.

When CSS 3 is finalised, we have some other colour values to add to the
tests such as rgba, hls, hsla, opacity, and the SVG colour keywords. The
algorithm provided by the W3C doesn't take into account opacity, so it
may require some thinking about.

Any ideas?


Roberto Scano
---
[1] http://www.juicystudio.com/services/csscontrast.asp
[2] http://www.w3.org/TR/WCAG10-CSS-TECHS/#units

Received on Monday, 9 February 2004 16:06:57 UTC