Batch Contrast Checker
Check many colour pairs at once for WCAG contrast, in pairs mode or palette mode, with AA and AAA results per pair and a CSV download. Runs in your browser.
| Sample | Text | Background | Ratio | AA normal | AA large / UI | AAA normal | AAA large |
|---|---|---|---|---|---|---|---|
| #000000 (#000000) | #ffffff (#ffffff) | 21.00:1 | Pass | Pass | Pass | Pass | |
| #767676 (#767676) | #ffffff (#ffffff) | 4.54:1 | Pass | Pass | Fail | Pass | |
| #777777 (#777777) | #ffffff (#ffffff) | 4.47:1 | Fail | Pass | Fail | Fail | |
| #ffffff (#ffffff) | #2a3596 (#2a3596) | 10.25:1 | Pass | Pass | Pass | Pass | |
| navy (#000080) | lightyellow (#ffffe0) | 15.72:1 | Pass | Pass | Pass | Pass | |
| #e53935 (#e53935) | #ffffff (#ffffff) | 4.22:1 | Fail | Pass | Fail | Fail |
Formula and notes
Relative luminance L = 0.2126 R + 0.7152 G + 0.0722 B, where each channel c (0-1) is linearised: c/12.92 if c <= 0.03928, else ((c + 0.055)/1.055)^2.4. Contrast = (L1 + 0.05) / (L2 + 0.05) with L1 the lighter colour. Example: #767676 on white = 4.54:1 (passes AA for normal text); #777777 on white = 4.47:1 (fails).
Ratios are shown rounded down to two decimals, so 4.499 never appears as a pass.
About Batch Contrast Checker
The Batch Contrast Checker tests many text and background colour pairs at once against WCAG AA and AAA, and lets you download the results as CSV.
Pairs mode
One pair per line, such as #000 #fff or navy on lightyellow. HEX, rgb() and colour names all work.
Palette mode
Enter your palette and every combination is checked, so four colours give 12 pairs.
Strict rounding
Ratios are rounded down, so a pair is never shown passing when it does not.
Download
CSV with each pair, its ratio and its AA and AAA results.
Good to know
Solid colours only; text on photos or gradients needs a manual check.
Private
Everything runs in your browser. Nothing you type is uploaded.
What ratio do you need?
WCAG AA asks for at least 4.5:1 for normal text and 3:1 for large text (about 24px, or 19px bold). AAA raises this to 7:1 and 4.5:1.
Icons and buttons
Under WCAG 2.1, icons, input borders and focus outlines need at least 3:1 against the colours next to them.
When a pair fails
Darken the text or lighten the background a little at a time, keeping the same hue, until it passes. Changing lightness usually works better than changing saturation.
How to use Batch Contrast Checker
- Choose the mode: Pairs or Palette.
- Type one pair per line, or one colour per line in palette mode.
- Read the summary and the table of ratios and pass or fail results.
- Press Download CSV to save the results.
Related guide: WCAG Colour Contrast: How to Check Your Design
Help & FAQ
What does the Batch Contrast Checker do?
It checks the WCAG contrast of many colour pairs at once and shows AA and AAA results for each pair.
How do we write a pair?
Put the text colour and the background colour on one line, separated by a space, a comma or the word on, such as navy on lightyellow.
Which colour formats work?
Hex codes such as #000 or #000000, rgb() values and CSS colour names such as white or navy.
What is palette mode?
You list the colours, and the tool tests every colour as text on every other colour. Four colours gave 12 pairs in the test.
What happens with an invalid colour?
The tool names the line and the value, for example Line 6: notacolour is not a valid colour.
What do the four result columns mean?
AA normal needs 4.5, AA large or interface parts needs 3, AAA normal needs 7 and AAA large needs 4.5.
Why does #777777 show 4.47 here and 4.48 in the single tool?
This tool rounds the ratio down to two decimals, as its page states, while the single Contrast Checker rounds to the nearest. Both fail AA for normal text.
Can we download the results?
Yes. Download CSV gives one row per pair with the ratio and the Pass or Fail results.
Does it check text on images or gradients?
No. It compares solid colours only.
Does it know our font size?
No. Use the large-text columns only if your text is large, at least 18 point or 14 point bold.
Is our colour list uploaded?
No. The check runs in your browser. In a test, only the site's small analytics calls were made.
Is a pass enough for accessibility?
No. Contrast is one part. Size, weight, spacing and the reader's screen also matter.