Skip to content

Public calculation evidence

40 reproducible color and contrast checks

Inspect the inputs, reference values and results behind our tools. Independent numeric references and correction invariants are labelled separately, so you can see what each check establishes.

By Color Match · Updated · color-validation-v1

40 of 40 implementation checks verified

28 contrast references were calculated independently with Python Decimal at 50-digit precision. Six CIEDE2000 reference pairs come from Sharma, Wu & Dalal (2005). Six correction checks test declared properties, not an independently certified optimal replacement color.

How to reproduce and interpret the checks

Open a contrast example to restore its foreground, background and target. The JSON and CSV retain unrounded results. Contrast references allow an absolute numeric error of 1e-10; the published ΔE00 references are rounded to four decimals and allow 0.00005. A verified result means the implementation agrees with that check, not that the color pair passes a text-contrast target.

For the Lab references, use the listed Lab inputs directly with CIEDE2000 and kL = kC = kH = 1. They test the difference formula; they do not independently test our sRGB conversion pipeline. The comparison tool converts sRGB to D50 Lab using Bradford adaptation. See the full methods and limits.

Run the downloaded generator with Python 3 from any folder: python contrast-reference.py --output references.json. It uses only the standard library. The release build reads stored reference values and fails if an implementation check disagrees. The public data is versioned; values are not refreshed merely to make a failing test pass.

Independent WCAG contrast references

Expected ratios were produced by an independent high-precision generator. The pass decision still uses the unrounded ratio.

contrast-reference inputs, expected values and computed outputs
Case / inputsExpectedComputedCheck
Black on white maximum#000000 on #FFFFFFReproduce in checker2121.000000:1Verified
Reversed maximum#FFFFFF on #000000Reproduce in checker2121.000000:1Verified
Identical black#000000 on #000000Reproduce in checker11.000000:1Verified
Identical gray#808080 on #808080Reproduce in checker11.000000:1Verified
Identical white#FFFFFF on #FFFFFFReproduce in checker11.000000:1Verified
Just below normal-text AA#777777 on #FFFFFFReproduce in checker4.47808945357721564.478089:1Verified
Just above normal-text AA#767676 on #FFFFFFReproduce in checker4.5422249596052544.542225:1Verified
Above normal-text AAA#595959 on #FFFFFFReproduce in checker7.0047292080359357.004729:1Verified
Below normal-text AAA#5A5A5A on #FFFFFFReproduce in checker6.89692621531293256.896926:1Verified
Above the 3:1 boundary#949494 on #FFFFFFReproduce in checker3.0334698257384763.033470:1Verified
Below the 3:1 boundary#959595 on #FFFFFFReproduce in checker2.9953461357088122.995346:1Verified
CSS teal and white#008080 on #FFFFFFReproduce in checker4.773409484295134.773409:1Verified
CSS turquoise and white#40E0D0 on #FFFFFFReproduce in checker1.64177002490726091.641770:1Verified
Black label on turquoise#000000 on #40E0D0Reproduce in checker12.79107285515596512.791073:1Verified
White label on yellow fails#FFFF00 on #FFFFFFReproduce in checker1.07383923092656991.073839:1Verified
Near-white framework foreground fails#FAFAFA on #FFFF00Reproduce in checker1.02881300189127221.028813:1Verified
Black label on yellow#000000 on #FFFF00Reproduce in checker19.55619.556000:1Verified
Pure red and white#FF0000 on #FFFFFFReproduce in checker3.99847677075399853.998477:1Verified
Pure blue and white#0000FF on #FFFFFFReproduce in checker8.5924713584288058.592471:1Verified
Pure green and black#00FF00 on #000000Reproduce in checker15.30415.304000:1Verified
G183 example link versus body#3366CC on #000000Reproduce in checker3.9132366162723223.913237:1Verified
G183 example link versus background#3366CC on #FFFFFFReproduce in checker5.36640179453401345.366402:1Verified
Dark-mode link and background#93C5FD on #111827Reproduce in checker9.8375005360607599.837501:1Verified
Dark-mode body and background#F9FAFB on #111827Reproduce in checker16.9753862444040616.975386:1Verified
Below sRGB transfer breakpoint#0A0A0A on #000000Reproduce in checker1.06070539670976751.060705:1Verified
Above sRGB transfer breakpoint#0B0B0B on #000000Reproduce in checker1.06693071527798321.066931:1Verified
Near-black channels#010203 on #040506Reproduce in checker1.0180083270504281.018008:1Verified
Pastel collection reading pair#FFF7FA on #382B43Reproduce in checker12.50147039148125412.501470:1Verified

Published CIEDE2000 reference pairs

The original Lab reference pairs are attributed to Sharma, Wu & Dalal. Use the numerical input coordinates; a HEX approximation would change the test.

difference-reference inputs, expected values and computed outputs
Case / inputsExpectedComputedCheck
Sharma reference pair 1Lab (50, 2.6772, -79.7751) / (50, 0, -82.7485)Link to reference row2.04252.0425Verified
Sharma reference pair 2Lab (50, 3.1571, -77.2803) / (50, 0, -82.7485)Link to reference row2.86152.8615Verified
Sharma reference pair 3Lab (50, 2.8361, -74.02) / (50, 0, -82.7485)Link to reference row3.44123.4412Verified
Sharma reference pair 4Lab (50, -1.3802, -84.2814) / (50, 0, -82.7485)Link to reference row11.0000Verified
Sharma reference pair 5Lab (50, -1.1848, -84.8006) / (50, 0, -82.7485)Link to reference row11.0000Verified
Sharma reference pair 6Lab (50, -0.9009, -85.5211) / (50, 0, -82.7485)Link to reference row11.0000Verified

Contrast correction invariants

Final rounded sRGB is checked again. These tests preserve the background, leave an already passing input unchanged, and report an unreachable target. They do not prove a globally minimal color change.

fix-invariant inputs, expected values and computed outputs
Case / inputsExpectedComputedCheck
Gray just below AA on white#777777 on #FFFFFFOutput: #767676Reproduce in checkerFinal sRGB contrast ≥ 4.5; passing input unchanged4.542225:1Verified
Turquoise text on white#40E0D0 on #FFFFFFOutput: #008579Reproduce in checkerFinal sRGB contrast ≥ 4.5; passing input unchanged4.534553:1Verified
Gray on black with a 7:1 target#777777 on #000000Output: #959595Reproduce in checkerFinal sRGB contrast ≥ 7; passing input unchanged7.010876:1Verified
Impossible 7:1 on a mid-gray background#FFFFFF on #777777Output: #FFFFFFReproduce in checkerNo color reaches 7:1 on this fixed background4.478089:1Verified
Already readable color stays unchanged#111827 on #FFFFFFOutput: #111827Reproduce in checkerFinal sRGB contrast ≥ 4.5; passing input unchanged17.739717:1Verified
Saturated yellow rechecked after sRGB rounding#FFFF00 on #FFFFFFOutput: #7F7900Reproduce in checkerFinal sRGB contrast ≥ 4.5; passing input unchanged4.528444:1Verified

Sources, reuse and corrections

Color Match-authored notes, the independent generator and contrast inputs are available under CC BY 4.0. Attribute Color Match and link to this version. The six published reference pairs are attributed to Sharma, Wu & Dalal (2005), Table 1; their original software is not redistributed. This page provides calculation evidence, not independent certification or a full WCAG audit.