Color Contrast Checker

Compare text and background colors, view their contrast ratio, and check the AA and AAA thresholds for normal and large text.

Color Pairs
Aa
The quick brown fox
jumps over the lazy dog — 0123456789
13.98:1 · AAA
Background
Foreground (Text)
WCAG Compliance
AA Normal text (4.5:1)
AA Large text (3:1)
AAA Normal text (7:1)
AAA Large text (4.5:1)
1:13:14.5:17:121:1
Text Size Preview
Heading Text (24px)
Body text at 16px — comfortable reading size for most content.
Small / caption text at 12px — requires higher contrast for readability.

How to check text contrast

  1. Enter or select the foreground (text) color.
  2. Enter or select the background color.
  3. Read the contrast ratio displayed on the preview.
  4. Check the relevant normal-text or large-text result in the WCAG panel.
  5. Adjust the pair and check again.

Swapping the foreground and background preserves the mathematical ratio, although the visual design changes. You can keep several pairs in the list and compare them side by side.

WCAG text-contrast requirements

AA normal text
4.5:1
AA large text
3:1
AAA normal text
7:1
AAA large text
4.5:1

Large text means at least 18pt regular or 14pt bold, approximately 24 CSS pixels or 18.7 CSS pixels respectively. Smaller text needs the higher normal-text thresholds.

Thresholds are assessed using the unrounded ratio. The displayed value is rounded for readability, so a pair can show 4.50:1 and still report a fail when its true ratio is below 4.5. The checker evaluates the unrounded value, not the rounded display.

Contrast examples

The quick brown fox
fg #000000onbg #FFFFFF21:1

Black on white — the maximum ratio.

The quick brown fox
fg #777777onbg #FFFFFF≈ 4.48:1

Gray on white — just below the AA normal-text threshold.

These are reference examples, not results from an independent audit of the tool.

What this check does not establish

Contrast alone does not assess keyboard access, screen-reader support, meaningful structure, focus visibility, or whether information is conveyed by color alone. A page can pass every contrast pair and still be inaccessible.

Text placed on images, gradients, or transparent backgrounds needs the actual background behind it evaluated. One solid-color pair does not represent a varying background.

Frequently asked questions

What is a contrast ratio?
A contrast ratio compares the relative luminance of two colors using the WCAG formula. The ratio ranges from 1:1 (no contrast, identical colors) to 21:1 (black on white). Higher ratios mean more distinguishable text.
What ratio should normal body text meet?
Normal-sized text should meet at least 4.5:1 to pass WCAG AA. The same 4.5:1 ratio is the AAA threshold for large text, while normal text needs 7:1 for AAA.
Does passing this checker mean my website is fully accessible?
No. This tool checks color contrast only. It does not assess keyboard access, screen-reader support, meaningful structure, focus visibility, or whether information relies on color alone. Contrast is one part of accessibility, not the whole picture.
Why can large text use a lower AA ratio?
Large text is easier to read at lower contrast because of its size and weight. WCAG defines large text as at least 18pt regular or 14pt bold, roughly 24 CSS pixels or 18.7 CSS pixels respectively, which qualifies for the 3:1 AA threshold.
Can I check text on a gradient?
Only one solid-color pair at a time. A gradient background varies in lightness across the element, so a single pair does not evaluate the whole gradient. Test the lightest and darkest areas the text passes over, or place text on a solid overlay.

More Color Tools