W3C home > Mailing lists > Public > w3c-wai-gl@w3.org > January to March 2004

Colour Contrast: what about opacity?

From: Roberto Scano - IWA/HWG <rscano@iwa-italy.org>
Date: Mon, 9 Feb 2004 22:06:38 +0100
Message-ID: <015401c3ef50$9d696ca0$0200a8c0@iwars>
To: "WCAG List" <w3c-wai-gl@w3.org>

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

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:17:55 UTC