W3C home > Mailing lists > Public > www-style@w3.org > March 2015

[css-color] incorrect contrast ratio calculation

From: Andrew VanWagoner <thetalecrafter@gmail.com>
Date: Sat, 14 Mar 2015 02:49:44 +0000
Message-ID: <CAECGhiyoJ_yBWTXRSOuALuZgWSFXfT9T0OYaBv3Skdg7dmOkmw@mail.gmail.com>
To: www-style list <www-style@w3.org>
Section 10.5 includes an incorrect formula for calculating contrast ratio:

(L1 + 0.05) / (L2 + 0.05)

where L1 is the smaller of the two luminances, and L2 is the larger.

According to http://www.w3.org/TR/WCAG20/#contrast-ratiodef
L1 is the *lighter* of the two, and lighter colors have a *larger* relative
luminance (1 white, 0 black)

so it should read:

where L1 is the larger of the two luminances, and L2 is the smaller.
Received on Saturday, 14 March 2015 02:50:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:52 UTC