Check WCAG color contrast and fix failing combinations in one click.
Last updated
Presets
Foreground
Background
Contrast ratio14.05:1
Normal text
AAAAA
Large text
AAAAA
UI components
AA
Preview
Large heading — 24px bold
Body text. The quick brown fox jumps over the lazy dog. Read a paragraph or two and see if the contrast feels comfortable for longer sessions.
Small caption — 12px regular. WCAG only protects 14pt and up at this size, so tiny text needs the strictest contrast.
Inline link →
What is a WCAG color contrast checker?
A *contrast checker* is what designers and developers reach for before shipping a screen. It computes the **contrast ratio** between two colors — your text and the background behind it — using the formula defined in the Web Content Accessibility Guidelines (WCAG). The bigger the ratio, the easier the text is to read.
WCAG defines three thresholds. **3:1** is the minimum for large headings (24px+ regular or 18.66px+ bold) and for the visible boundary of interactive UI components like buttons, form fields, and icons. **4.5:1** is the AA minimum for body text — the bar most teams aim for. **7:1** is AAA, the highest grade, which gives strong support to readers with low vision.
Contrast is **not** the same as how vivid two colors look. Two punchy brand colors can still be hard to read if their *luminance* is close. This tool runs the WCAG luminance formula on every channel, reports the exact ratio, and grades each context, so you don't have to guess.
What you'll learn while checking contrast
Contrast ratios run from 1:1 (identical colors) to 21:1 (pure black on pure white). Everyday brand pairs usually land between 2:1 and 12:1.
WCAG uses *relative luminance*, not perceived brightness — yellow on white can look fine to your eye and still fail at 1.3:1.
Large text gets a relaxed threshold (3:1 for AA) because the larger glyphs are easier to resolve at a given contrast level.
How to check color contrast step by step
1
Enter your two colors
Type or paste a HEX value, or use the color picker. The foreground is your text or icon; the background is whatever sits behind it.
2
Read the contrast ratio
The big number on the left is the WCAG contrast ratio. Anything below 3:1 is risky for any UI; below 4.5:1 fails for body text.
3
Check the AA/AAA grades
Three rows show pass/fail for normal text (4.5/7), large text (3/4.5), and UI components (3:1). Aim for the green checkmarks on every row your design actually uses.
4
Hit "Adjust foreground" if a row fails
When AA fails, the tool can nudge your foreground lightness up or down — keeping the hue — until the pair passes. Click again for AAA.
5
Copy the final pair
Once both colors pass the contexts you need, copy the CSS snippet (color: + background:) and drop it into your stylesheet or design token file.
Logotypes and incidental text are exempt — but usability still matters
Disabled state
Exempt
Exempt
Inactive controls are exempt, but be careful you don't lean on this to ship low-contrast defaults
Contrast examples to try
A passing dark-on-light pair
Body text, comfortably AA + AAA
color:#1f2937;/* slate-800 */background:#f9fafb;/* slate-50 *//* Contrast ratio ≈ 14.6:1 */
Classic dark-slate on near-white. Passes AAA for body text (≥ 7:1) with room to spare. Most product UIs should aim for this neighborhood by default.
Brand blue that *just barely* fails AA
Looks bold, fails the math
color:#3b82f6;/* blue-500 */background:#ffffff;/* Contrast ratio ≈ 4.0:1 */
Vivid blues on white often land near 4:1 — readable for large headings (passes 3:1 AA Large) but fails the 4.5:1 bar for body copy. Use it for buttons and CTA labels at 18px+, not paragraph text.
Bright yellow against white is a famous trap: the colors look loud but their luminance is too close. Reserve this combo for dark backgrounds (e.g. #facc15 on #1f2937 lands at ≈ 12:1).
Common contrast mistakes
Trusting your eyes instead of the ratio. Bright, saturated colors can feel "bold" while still failing the WCAG math.
Forgetting that thin and light font weights effectively *reduce* contrast — they read as less ink per pixel. Bump up the ratio for hairline weights.
Checking only against pure white. Real backgrounds are off-white, gradient, or photographic — recheck against the actual color your text sits on.
WCAG Contrast Checker FAQ
What is a good color contrast ratio?
Aim for at least 4.5:1 for body text and 3:1 for large headings or interactive UI. 7:1 is the AAA target — strict but worth aiming for on critical reading flows like documentation, instructions, and error messages.
What is the difference between AA and AAA?
AA is the legal accessibility baseline most regulations require (WCAG 2.1/2.2 AA). AAA is the stricter target for organizations that want to support users with low vision. AAA is not required, but on body text it's a reasonable goal.
What counts as "large text" in WCAG?
WCAG defines large text as 18pt or larger (about 24px) at regular weight, or 14pt or larger (about 18.66px) at bold weight. Large text only needs 3:1 to pass AA; smaller text needs 4.5:1.
Why does my brand color fail contrast?
Bright mid-tone hues — especially blues, yellows, and reds at ~50% lightness — often land just under 4.5:1 on white. The fix is usually to darken the foreground (or use it as a background under white text). Use the "Adjust foreground" button to find the nearest passing shade.
Do disabled controls need to pass WCAG contrast?
No — disabled controls and pure decoration are explicitly exempt. But "exempt" is not the same as "good UX." If users can't tell a disabled button from the background, they don't know it exists.