Contrast Checker
Check WCAG AA/AAA contrast ratio for accessibility
The quick brown fox
Sample text in normal size — check legibility here.
:1
Contrast ratio
What is a contrast checker?
A contrast checker measures how distinct two colors look to a human eye and grades that distinctness against the Web Content Accessibility Guidelines (WCAG). This tool calculates the contrast ratio between any pair of colors using the WCAG 2.1 relative luminance formula (the same one used by browsers, screen readers, and accessibility audits) and reports whether the combination meets the WCAG AA or AAA thresholds for body text, large text, and non-text user-interface elements. Results update live as you adjust the colors, with a side-by-side preview so you can see the impact at the same time as the number.
Contrast ratios run from 1:1 (identical colors, invisible) to 21:1 (pure black on pure white). The ratio is independent of which color is in the foreground — black on white reads the same as white on black. Two thresholds are defined for body text in WCAG: 4.5:1 for AA and 7:1 for AAA. Large text (18pt or 14pt bold and above) gets a relaxed threshold because larger letterforms are easier to discriminate at low contrast: 3:1 for AA and 4.5:1 for AAA. WCAG 2.1 added a third threshold of 3:1 for non-text elements — UI components, focus indicators, meaningful icons, and form-control borders.
Sufficient color contrast is a baseline accessibility requirement. Roughly one in twelve men and one in two hundred women has some form of color-vision deficiency; many more people have age-related macular degeneration, glaucoma, cataracts, or simply read screens in bright sunlight. Designs that pass WCAG AA contrast are legible to nearly all of these readers without modification. AA is also the legal requirement under the European Accessibility Act (EAA), the US Section 508 standards, the UK Equality Act, and the WCAG-derived rules in most other jurisdictions — so checking contrast is not only a craft concern but a compliance one.
WCAG contrast levels in detail
WCAG defines four named thresholds for text plus a separate threshold for non-text UI. Each one applies in a specific context. The right one to design against depends on the size of the text and how much accessibility headroom your project needs.
AA Normal Text
4.5 : 1
The minimum contrast ratio for body text smaller than 18pt (or 14pt bold). This is the floor for all text on a public-facing website that wants to claim WCAG conformance. Success criterion 1.4.3 Contrast (Minimum). Roughly equivalent to mid-grey text (#767676) on white, or pure white on a slightly off-black (#595959).
AA Large Text
3 : 1
Large text gets a relaxed threshold because the larger letter shapes are easier to read at low contrast. "Large" in WCAG means at least 18pt (about 24px in CSS) or 14pt bold (about 19px bold). The 3:1 ratio is also the threshold for non-text elements like buttons, focus rings, form-control borders, and meaningful icons.
AAA Normal Text
7 : 1
The enhanced contrast level — success criterion 1.4.6. Recommended for sites where readability is critical (long-form reading, government services, educational platforms, medical interfaces) and for users with low vision. Few color systems offer many AAA-passing combinations, so AAA usually constrains the palette more than AA.
AAA Large Text
4.5 : 1
The enhanced threshold for text 18pt or 14pt bold and above. Numerically equal to AA Normal — meaning that a color pair which barely passes AA for body text passes AAA for headings. Designers often pick a single 4.5:1 pair to use for both small body text (AA) and large headings (AAA) for a consistent feel.
Non-text UI elements
3 : 1
WCAG 2.1 added success criterion 1.4.11 Non-text Contrast: any UI component or graphical object that conveys information must have a 3:1 contrast against its surroundings. That covers active form-field borders, focus indicators, icons that are not purely decorative, charts and graphs, and the visual states (hover, pressed, disabled active) of interactive controls. Disabled controls are explicitly exempt.
Exempt cases
no minimum
WCAG explicitly exempts logotypes, decorative text that conveys no information, incidental text in photographs, and text inside disabled controls. You still should consider readability for those — but they do not count against an AA or AAA conformance claim.
WCAG 3 / APCA
in draft
A successor metric, the Accessible Perceptual Contrast Algorithm (APCA), is in draft for WCAG 3. APCA scores in Lc values (lightness contrast) on a perceptual scale rather than a physical luminance ratio, and accounts for font weight and size more directly. It is not yet a published standard — for legal compliance and audits in 2026 you should still target WCAG 2.1 / 2.2 AA. APCA is a useful second opinion for hard-to-judge dark-mode palettes.
Required contrast by element type
The threshold that applies depends on what the color is used for. The table below summarises the WCAG-required minimums by element type at the AA and AAA levels.
| Element | AA minimum | AAA minimum |
|---|---|---|
| Body text below 18pt (or 14pt bold) | 4.5 : 1 | 7 : 1 |
| Text 18pt or 14pt bold and above | 3 : 1 | 4.5 : 1 |
| Bold headings (most weights of 14pt+) | 3 : 1 | 4.5 : 1 |
| Buttons and active form-control borders | 3 : 1 | n/a |
| Focus indicators | 3 : 1 | n/a |
| Icons that convey meaning | 3 : 1 | n/a |
| Charts, graphs, data visualisations | 3 : 1 | n/a |
| Placeholder text in form fields | 4.5 : 1 | 7 : 1 |
| Link text against surrounding text | 3 : 1 | 4.5 : 1 |
| Disabled controls (inactive UI) | exempt | exempt |
| Logotypes | exempt | exempt |
| Decorative text (no information) | exempt | exempt |
| Incidental text in images / photos | exempt | exempt |
How the contrast ratio is calculated
The WCAG contrast ratio is a function of relative luminance — a perception-weighted measure of how much light each color reflects. Each sRGB channel value (0–255) is normalised to 0–1, then transformed through the sRGB gamma curve to a linear-light value: roughly ((c/255 + 0.055) / 1.055)^2.4 for values above 0.04045, and a simple linear formula for darker values. The three linearised channels are weighted by human eye sensitivity — 0.2126·R + 0.7152·G + 0.0722·B — to produce a single luminance number between 0 (black) and 1 (white). The ratio between the lighter and darker color is then (L1 + 0.05) / (L2 + 0.05). The 0.05 offset accounts for ambient screen reflectance: even a pure-black pixel reflects a small amount of light, so the formula avoids dividing by zero and matches measured contrast more closely.
Frequently asked questions
What's the difference between WCAG AA and AAA?
What counts as 'large text'?
Is checking contrast a legal requirement?
Is the contrast ratio symmetric — does dark-on-light equal light-on-dark?
#000 on #fff and #fff on #000 both score the maximum 21:1. This makes the metric agnostic to whether your design is light-mode or dark-mode.