Color Tools

Contrast Checker (WCAG)

Check whether text stays readable on its background, see WCAG AA and AAA results instantly, and get the closest passing color in one click.

Accepts HEX, rgb() or hsl(), e.g. #2E46D0 or rgb(46, 70, 208).

Large text, 24px

Body text at 16px. Sphinx of black quartz, judge my vow — 0123456789.

Small print at 13px, the size people squint at on price tags.

Outlined button
Contrast ratio
—
CheckNeedsResult
Normal text · AA4.5 : 1
Normal text · AAA7 : 1
Large text (24px+ or 19px bold) · AA3 : 1
Large text · AAA4.5 : 1
UI components & graphics · AA3 : 1
Runs entirely in your browser. Free, no sign-up.
Preview embedded tool

Works in an HTML block on WordPress, Wix, Squarespace or a custom website. Change the height if your layout needs more space.

How to use the Contrast Checker

  1. Enter the text color. Type a HEX code such as #7A7A7A, paste an rgb() or hsl() value from your design file, or click the swatch to use your system color picker.
  2. Enter the background color. The preview on the right updates as you type, showing large text, body text, small print and an outlined button in your exact pairing.
  3. Read the ratio and the checklist. The big number is the WCAG contrast ratio. The table below it tells you which of the five standard checks pass: AA and AAA for normal text, AA and AAA for large text, and the 3:1 rule for icons and UI shapes.
  4. Fix a failing pair in one click. When a pairing misses the next level, the tool suggests the closest text color and the closest background color that pass. It keeps the hue and saturation and only shifts lightness, so your palette still looks like your palette. Press Use to apply it.
  5. Save or share the result. Copy a plain-text summary for a client, copy the two CSS declarations, or use Share — the colors are stored in the link, so whoever opens it sees the same pairing.

Why contrast is worth checking

Contrast is the difference in brightness between two colors, and it decides whether words survive contact with real screens. A portfolio caption in #9B9B9B on white looks elegant on a calibrated monitor at full brightness. On a phone at the bus stop it is a pale smudge, because that pairing is only 2.77:1. Roughly one in twelve men and one in two hundred women have some form of color vision deficiency, and almost everyone over fifty needs more contrast than they did at twenty. The people buying prints and booking commissions are not all reading on your studio display.

The Web Content Accessibility Guidelines turn this into a number. Each color gets a relative luminance between 0 (black) and 1 (white), calculated from its red, green and blue channels weighted by how sensitive the eye is to each — green counts for about 72%, red 21%, blue only 7%. The ratio is (lighter + 0.05) / (darker + 0.05), which runs from 1:1 for identical colors to 21:1 for black on white.

That weighting explains results that surprise painters. Pure red #FF0000 on white scores just 3.99:1, failing body text, yet the same red on black reaches 5.25:1 and passes. A cheerful mustard #F2C14E on white is a dismal 1.67:1, but on near-black #1D1C1A it hits 10.14:1. Hue tells you little; value does almost all of the work — which is exactly what you learned squinting at a still life.

Real pairings, measured

Text Background Ratio What passes
#767676 gray #FFFFFF 4.54 : 1 AA — the lightest neutral gray that passes on white
#777777 gray #FFFFFF 4.47 : 1 Large text only — one step lighter and it fails
#595959 gray #FFFFFF 7.00 : 1 AAA for all text
#FF0000 red #FFFFFF 3.99 : 1 Large text and icons only
#E8590C orange #FFFFFF 3.58 : 1 Large text only
#C2410C burnt orange #FFFFFF 5.17 : 1 AA for all text
#FFFFFF #3B82F6 bright blue 3.67 : 1 Large text only
#FFFFFF #2563EB deeper blue 5.16 : 1 AA for all text

Notice how small the steps are. Moving from #E8590C to #C2410C keeps the same family of orange but takes a pairing from failing to passing. That is the kind of adjustment the fix suggestions above are designed to find.

Tips from practice

Check at the smallest size you actually use. Large-text rules only apply from 24px regular or roughly 19px bold. Captions, price labels and footer links are almost never that big, so hold them to 4.5:1 even when the headline above gets away with 3:1.

Beware of mid-tone backgrounds. On a 50% gray such as #808080, white text scores about 3.9:1 and black text 5.31:1 — neither is comfortable for long reading. If your brand color sits in the middle of the value scale, use it for shapes and buttons and put the text on something lighter or darker.

Test text over artwork at its worst spot. When lettering sits on a painting or photo, sample the lightest area behind light text and the darkest area behind dark text, then check those. If the worst spot fails, add a soft scrim, a solid band, or a subtle text shadow instead of hoping nobody notices.

Build a text-safe twin for each brand color. Keep your signature #E8590C for illustrations and large display type, and pair it with a darker #C2410C for links and small text. Clients rarely notice the swap; readers notice when it is missing.

Don’t encode meaning in color alone. A red “sold” dot and a green “available” dot can look identical to a visitor with deuteranopia. Add a label or a shape, then confirm with the Color Blindness Simulator.

FAQ

What contrast ratio do I need for body text?

WCAG 2.2 level AA asks for at least 4.5:1 between normal text and its background. Level AAA raises that to 7:1. For large text — 24px regular or about 19px bold and up — the minimums drop to 3:1 for AA and 4.5:1 for AAA.

Why does the checker show 4.49:1 as a fail?

The guidelines treat the thresholds as hard limits, so a ratio is never rounded up. 4.49:1 is below 4.5:1 and fails AA for normal text even though it looks close. This tool truncates to two decimals for the same reason.

Does contrast matter for illustrations and logos?

WCAG exempts logos and purely decorative art, but any graphic that carries meaning — chart lines, icons, map borders, the outline of a button — should reach 3:1 against its neighbors. In practice that is a good minimum for any shape you want people to notice.

Can two colors with the same contrast ratio look different?

Yes. The ratio only compares relative luminance, so a saturated red on black and a gray on black can share a ratio while one vibrates and the other looks flat. Font weight, size and anti-aliasing also change how readable a pairing feels. Treat the ratio as a floor, then judge by eye.

Is my color data sent anywhere?

No. The calculation runs in your browser with the WCAG relative luminance formula. Colors are only stored in the page address after the # sign so you can bookmark or share a pairing.