Calculator
What the Contrast Checker does
Contrast Checker: checks Contrast ratio, WCAG verdict and Nearest colour that passes AA from Text colour and Background colour. Formula: Contrast ratio = (L1 + 0.05) / (L2 + 0.05).
The Contrast Checker takes Text colour and Background colour and returns Contrast ratio, WCAG verdict and Nearest colour that passes AA. The result recalculates on every keystroke without a button press or a page reload.
It is mostly used by anyone checking a colour for legibility. Contrast failures are the most common accessibility problem on the web, and the easiest to fix.
Everything happens inside this page. Nothing you type is sent to a server, and there is nothing for us to store.
Further down the page: what each field expects, how the result is derived, and one example worked from the defaults.
What do the Contrast Checker fields mean?
The Contrast Checker uses 2 inputs. The form opens pre-filled, so the fastest way in is usually to overwrite the one field you actually care about.
| Field | What to enter | Default |
|---|---|---|
| Text colour | optional | #1a1a1a |
| Background colour | optional | #ffffff |
How does the Contrast Checker work?
L1 and L2 are the relative luminances of the lighter and darker colour. WCAG AA needs 4.5:1 for body text, AAA needs 7:1.
Validation is deliberately strict: silently coercing a bad value is how wrong numbers get trusted.
What a typical run looks like
You provide: Text colour and Background colour
What happens: the file is read into memory by your browser, processed locally, and offered back as a download. It is never uploaded.
You get back: the result as a file you can save, with a one-line summary beside it.
Nothing queues behind a server, so the wait is your device working, and the size limit is set by memory rather than by an upload cap.
Read next: Colour Contrast and WCAG: The Ratio, the Thresholds, What They Miss
How to use it
- Put Text colour.
- Key in Background colour.
- The output refreshes live, so you can stop as soon as the number looks right.
- The results panel then shows Contrast ratio, WCAG verdict and Nearest colour that passes AA.
- Both Copy Link and Print capture the current state, so pick whichever suits how you file things.
What this tool does not do
- Conversions between colour spaces with different gamuts are approximate at the edges.
- Colours render differently across displays; the values are exact but the appearance is not guaranteed.
- The result reflects the moment you ran it; anything that changes over time is not tracked.
Frequently asked questions
Only Text colour and Background colour. A starting value is in place for each, which means a single edit is enough to get a meaningful answer.
No. There is no upload step, no database, and nothing to delete afterwards.
It costs nothing, and there is no limit on repeat use.
It matches what you would get working it out by hand, with fewer opportunities to slip.