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.
| Case / inputs | Expected | Computed | Check |
|---|---|---|---|
| Black on white maximum#000000 on #FFFFFFReproduce in checker | 21 | 21.000000:1 | Verified |
| Reversed maximum#FFFFFF on #000000Reproduce in checker | 21 | 21.000000:1 | Verified |
| Identical black#000000 on #000000Reproduce in checker | 1 | 1.000000:1 | Verified |
| Identical gray#808080 on #808080Reproduce in checker | 1 | 1.000000:1 | Verified |
| Identical white#FFFFFF on #FFFFFFReproduce in checker | 1 | 1.000000:1 | Verified |
| Just below normal-text AA#777777 on #FFFFFFReproduce in checker | 4.4780894535772156 | 4.478089:1 | Verified |
| Just above normal-text AA#767676 on #FFFFFFReproduce in checker | 4.542224959605254 | 4.542225:1 | Verified |
| Above normal-text AAA#595959 on #FFFFFFReproduce in checker | 7.004729208035935 | 7.004729:1 | Verified |
| Below normal-text AAA#5A5A5A on #FFFFFFReproduce in checker | 6.8969262153129325 | 6.896926:1 | Verified |
| Above the 3:1 boundary#949494 on #FFFFFFReproduce in checker | 3.033469825738476 | 3.033470:1 | Verified |
| Below the 3:1 boundary#959595 on #FFFFFFReproduce in checker | 2.995346135708812 | 2.995346:1 | Verified |
| CSS teal and white#008080 on #FFFFFFReproduce in checker | 4.77340948429513 | 4.773409:1 | Verified |
| CSS turquoise and white#40E0D0 on #FFFFFFReproduce in checker | 1.6417700249072609 | 1.641770:1 | Verified |
| Black label on turquoise#000000 on #40E0D0Reproduce in checker | 12.791072855155965 | 12.791073:1 | Verified |
| White label on yellow fails#FFFF00 on #FFFFFFReproduce in checker | 1.0738392309265699 | 1.073839:1 | Verified |
| Near-white framework foreground fails#FAFAFA on #FFFF00Reproduce in checker | 1.0288130018912722 | 1.028813:1 | Verified |
| Black label on yellow#000000 on #FFFF00Reproduce in checker | 19.556 | 19.556000:1 | Verified |
| Pure red and white#FF0000 on #FFFFFFReproduce in checker | 3.9984767707539985 | 3.998477:1 | Verified |
| Pure blue and white#0000FF on #FFFFFFReproduce in checker | 8.592471358428805 | 8.592471:1 | Verified |
| Pure green and black#00FF00 on #000000Reproduce in checker | 15.304 | 15.304000:1 | Verified |
| G183 example link versus body#3366CC on #000000Reproduce in checker | 3.913236616272322 | 3.913237:1 | Verified |
| G183 example link versus background#3366CC on #FFFFFFReproduce in checker | 5.3664017945340134 | 5.366402:1 | Verified |
| Dark-mode link and background#93C5FD on #111827Reproduce in checker | 9.837500536060759 | 9.837501:1 | Verified |
| Dark-mode body and background#F9FAFB on #111827Reproduce in checker | 16.97538624440406 | 16.975386:1 | Verified |
| Below sRGB transfer breakpoint#0A0A0A on #000000Reproduce in checker | 1.0607053967097675 | 1.060705:1 | Verified |
| Above sRGB transfer breakpoint#0B0B0B on #000000Reproduce in checker | 1.0669307152779832 | 1.066931:1 | Verified |
| Near-black channels#010203 on #040506Reproduce in checker | 1.018008327050428 | 1.018008:1 | Verified |
| Pastel collection reading pair#FFF7FA on #382B43Reproduce in checker | 12.501470391481254 | 12.501470:1 | Verified |
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.
| Case / inputs | Expected | Computed | Check |
|---|---|---|---|
| Sharma reference pair 1Lab (50, 2.6772, -79.7751) / (50, 0, -82.7485)Link to reference row | 2.0425 | 2.0425 | Verified |
| Sharma reference pair 2Lab (50, 3.1571, -77.2803) / (50, 0, -82.7485)Link to reference row | 2.8615 | 2.8615 | Verified |
| Sharma reference pair 3Lab (50, 2.8361, -74.02) / (50, 0, -82.7485)Link to reference row | 3.4412 | 3.4412 | Verified |
| Sharma reference pair 4Lab (50, -1.3802, -84.2814) / (50, 0, -82.7485)Link to reference row | 1 | 1.0000 | Verified |
| Sharma reference pair 5Lab (50, -1.1848, -84.8006) / (50, 0, -82.7485)Link to reference row | 1 | 1.0000 | Verified |
| Sharma reference pair 6Lab (50, -0.9009, -85.5211) / (50, 0, -82.7485)Link to reference row | 1 | 1.0000 | Verified |
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.
| Case / inputs | Expected | Computed | Check |
|---|---|---|---|
| Gray just below AA on white#777777 on #FFFFFFOutput: #767676Reproduce in checker | Final sRGB contrast ≥ 4.5; passing input unchanged | 4.542225:1 | Verified |
| Turquoise text on white#40E0D0 on #FFFFFFOutput: #008579Reproduce in checker | Final sRGB contrast ≥ 4.5; passing input unchanged | 4.534553:1 | Verified |
| Gray on black with a 7:1 target#777777 on #000000Output: #959595Reproduce in checker | Final sRGB contrast ≥ 7; passing input unchanged | 7.010876:1 | Verified |
| Impossible 7:1 on a mid-gray background#FFFFFF on #777777Output: #FFFFFFReproduce in checker | No color reaches 7:1 on this fixed background | 4.478089:1 | Verified |
| Already readable color stays unchanged#111827 on #FFFFFFOutput: #111827Reproduce in checker | Final sRGB contrast ≥ 4.5; passing input unchanged | 17.739717:1 | Verified |
| Saturated yellow rechecked after sRGB rounding#FFFF00 on #FFFFFFOutput: #7F7900Reproduce in checker | Final sRGB contrast ≥ 4.5; passing input unchanged | 4.528444:1 | Verified |
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.