Color Contrast Checker
Check text and background colours against WCAG 2.2 AA and AAA, get the nearest colours that pass, and preview them for colour blindness.
Runs in your browser. Nothing you add is uploaded.
What the Color Contrast Checker does
Text that is too close in colour to its background is hard to read for everyone and impossible for many people with low vision or colour blindness. This checker calculates the WCAG 2.2 contrast ratio between any two CSS colours — including transparent ones, which are checked as they actually appear — and shows whether the pair passes AA and AAA for normal text, large text and interface components. If it fails, it suggests the nearest text or background colour that passes while keeping the same hue. Ratios are cut rather than rounded, so a pair at 4.49:1 never looks like a pass. Previews show the pair for the main kinds of colour blindness.
How to check colour contrast
- Enter the text colour and the background colour in any CSS format, or pick them.
- Read the contrast ratio, from 1:1 (identical colours) to 21:1 (black on white), and the pass or fail for each WCAG check.
- If it fails, choose AA or AAA under Fix it and use the suggested text or background colour.
- Look at the preview with real text and a button outline, then at the colour-vision previews.
The Color Contrast Checker runs entirely in your browser — nothing you enter is uploaded, stored, or logged.
When to use it
Checking brand colours before launch
A light brand green on white often scores around 2.5:1 — fine for decoration but failing for body text. Finding this early lets you pick a darker shade for text and keep the bright one for backgrounds and icons.
Meeting accessibility requirements
Public-sector and many corporate sites must meet WCAG AA. Checking every text and background pair in your design system before build is much cheaper than fixing it after an audit.
Buttons and form states
Placeholder text, disabled buttons and error messages are the usual failures. Checking them — and checking that errors are not shown by colour alone — makes forms usable for more people.
Good to know
- AA needs 4.5:1 for normal text and 3:1 for large text (24 px, or about 19 px bold). AAA needs 7:1 and 4.5:1.
- Icons, input borders and focus rings are non-text elements and need at least 3:1 against what is next to them.
- Never rely on colour alone for meaning: add an icon or text to red error and green success states.
- Pure black on pure white is the maximum 21:1, but very dark grey on white (around 15:1) is often more comfortable for long reading.
Frequently asked questions
What is the minimum WCAG AA contrast ratio?
How is the contrast ratio calculated?
What counts as large text in WCAG?
Does WCAG 3 change these rules?
Related tools
Regex Builder
Build a regular expression from blocks, with live matches.
SQL Formatter
Format, beautify, and minify SQL queries for Postgres, MySQL, and SQLite.
JSON to YAML Converter
Convert bidirectional JSON to YAML and YAML to JSON with presets.
Chmod Permissions Calculator
Interactive 3x3 Linux permissions matrix, octal sync, and command generator.