Color Contrast Checker

Enter a text color and a background color to get their WCAG contrast ratio and a pass or fail for normal text, large text and interface components. If a pair fails, the checker suggests the nearest text color that passes.

color-contrast-checker · runs locally
Large text sample (24px)Normal body text at 16px. The quick brown fox jumps over the lazy dog.Small print at 13px is harder still to read.
2.53:1contrast ratio
FailAA · normal text (4.5:1)
FailAA · large text (3:1)
FailAAA · normal text (7:1)
FailAAA · large text (4.5:1)
FailUI components & icons (3:1)
Nearest text color that passes AA (4.5:1)
#6d7787 · 4.52:1
Nearest text color that passes AAA (7:1)
#525965 · 7.05:1

How to check color contrast

Type or pick a text color and a background color. The preview shows both at real text sizes, and the result row shows the contrast ratio alongside a pass or fail for each WCAG level. If the pair falls short, the checker nudges the text color lighter or darker, keeping its hue, until it reaches 4.5:1 (AA) or 7:1 (AAA), and offers that color with a single click. The math runs in your browser.

WCAG contrast requirements at a glance

ContentLevel AALevel AAAWCAG criterion
Normal text (under 24px, or under 18.66px bold)4.5:17:11.4.3 / 1.4.6
Large text (24px+, or 18.66px+ bold)3:14.5:11.4.3 / 1.4.6
Icons, input borders, focus rings, chart lines3:1—1.4.11
Logos, decorative images, disabled controlsExemptExempt—

Common contrast failures

The usual offenders are mid-grey body text on white (#999 on #fff is only 2.85:1), white text on brand colors such as light orange or teal, placeholder text in form fields, and text laid over photos. A middle grey like #767676 is about the lightest grey that still passes 4.5:1 on pure white. For text on images, add a dark overlay or a solid backdrop behind the text and check the text against that backdrop color.

To build an accessible palette from scratch, start with the Color Palette Generator, then run each text and background pairing through this checker. The Hex to RGB Converter helps when a design file gives you colors in another format. For why the thresholds sit where they do and how to fix a failing brand color, read the guide to WCAG color contrast.

Frequently asked questions

What is a good color contrast ratio?

WCAG 2.2 level AA asks for at least 4.5:1 between normal body text and its background, and 3:1 for large text and for icons, input borders and other interface parts. Level AAA raises the text thresholds to 7:1 and 4.5:1. Ratios run from 1:1 (identical colors) to 21:1 (black on white). 4.5:1 is the figure most accessibility policies and laws point to.

What counts as large text in WCAG?

At least 18 point, or 14 point bold. In CSS pixels that is roughly 24px regular or 18.66px bold. Headings usually qualify; body copy, captions, buttons with small labels and placeholder text usually do not, so they need the stricter 4.5:1.

How is the contrast ratio calculated?

Each color is converted to relative luminance: the sRGB channels are linearized and weighted 0.2126 red, 0.7152 green and 0.0722 blue, because the eye is most sensitive to green. The ratio is (L1 + 0.05) ÷ (L2 + 0.05), with the lighter color on top. This checker uses that WCAG 2 formula, and floors the result to two decimals so a 4.497 never rounds up to a pass.

Does contrast apply to placeholder text and disabled buttons?

Placeholder text is real text, so it needs 4.5:1 like anything else; light grey placeholders are one of the most common audit failures. Disabled controls are exempt under WCAG, but if the disabled state carries information users need, keeping it readable is still kinder.

What about APCA and WCAG 3?

APCA is a newer contrast method being developed for a future WCAG 3. It accounts for font weight and size and treats dark-on-light and light-on-dark differently. It is not yet a standard you can be audited against, so WCAG 2.2 ratios remain the compliance target. Passing AA by a comfortable margin usually reads well under both.