Text contrast checker
Validate body text, labels, helper copy, and link text against WCAG AA (4.5:1) and AAA (7:1) for normal text. Adjust font size and weight to see how thresholds change.
Check foreground and background color contrast ratios for WCAG 2.2 AA and AAA. Test text, buttons, icons, UI components and get accessible color feedback instantly.
Last updated: May 15, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeColor Contrast Checker measures how readable a foreground color is against a background color and compares that result with WCAG 2.2 accessibility thresholds. It supports HEX, RGB, RGBA, HSL, and HSLA colors, checks AA and AAA levels, and tests normal text, large text, and non-text UI components in one place.
It is not only for formal audits. Designers, developers, and accessibility reviewers use contrast checks during mockups, component reviews, and brand updates because a color pair that looks polished in a design file can still fail for small text, muted states, or lower-vision users. You can also test semi-transparent colors with opacity blending, compare a full palette matrix at once, pick colors from screenshots, and export results as CSS variables or Tailwind classes.
Enter a foreground color (text, icon, or border) using HEX, RGB, RGBA, HSL, or HSLA
Enter a background color in the same field
Read the contrast ratio and WCAG AA/AAA pass or fail result instantly
Switch tabs to Preview UI components, see Improve suggestions, or copy Developer output
Adjust colors or use the Improve tab suggestions until your pair meets the required level
Copy the result, share a link, or export as CSS variables or a PNG report
The same brand color can pass for large headings but fail for body copy, which is why testing exact pairs matters.
Foreground: #1f2937
Background: #f9fafb
Text size: normal body textContrast ratio: 14.05:1
WCAG AA: Pass
WCAG AAA: Pass
Large text: PassAA and AAA thresholds are not interchangeable. A pair that works for a large hero heading may still fail for smaller body text or muted helper labels.
Test hover, disabled, and secondary button states too. Teams often validate primary colors but miss lower-contrast UI states introduced later.
Broader workflow content that links this tool back into the wider cluster.

Pick accessible button colors for labels, fills, borders, hover states, disabled states, and focus rings without flattening your UI.

Understand the difference between WCAG AA and AAA contrast targets, when each one is realistic, and how to apply them without overcorrecting your palette.

A practical explanation of good contrast ratios for body text, large headings, icons, buttons, and muted interface states.
Paste HEX, RGB, RGBA, HSL, or HSLA — alpha updates opacity automatically.
Contrast ratio
Pass/fail uses the raw computed ratio; displayed ratio is floored to two decimals.
Below 18pt / 24px
18pt / 24px or 14pt / 18.66px bold
Icons, buttons, borders
Selected sample
16px, Regular uses the normal text AA threshold (4.5:1).
This tool helps designers and developers check whether text, buttons, icons, and UI components have enough contrast before publishing. It supports HEX, RGB, RGBA, HSL, and HSLA colors, checks WCAG 2.2 AA and AAA thresholds, and lets you test normal text, large text, and non-text UI components in one place.
Normal text contrast
4.5:1 minimum for WCAG AA — body text, labels, links, and helper copy.
Large text contrast
3:1 minimum for WCAG AA — headings at 18pt/24px regular or 14pt/18.66px bold and above.
UI component contrast
3:1 for meaningful buttons, icons, input borders, focus rings, toggles, and chart marks.
Palette contrast
Compare every color pair in your brand palette at once using the matrix below.
Semi-transparent colors
Paste RGBA or HSLA values, or use opacity sliders. The tool blends before calculating.
AAA enhanced contrast
7:1 for normal text and 4.5:1 for large text when targeting the strictest readability level.
Compare all color pairs at once. Click any cell to apply that pair to the main checker.
| FG ↓BG → | #1A1A1A | #FFFFFF | #2563EB | #F59E0B | #10B981 | #EF4444 |
|---|---|---|---|---|---|---|
| #1A1A1A | — | |||||
| #FFFFFF | — | |||||
| #2563EB | — | |||||
| #F59E0B | — | |||||
| #10B981 | — | |||||
| #EF4444 | — |
Click any cell to apply that foreground / background pair to the main checker above. AA = 4.5:1, AAA = 7:1 for normal text.
Upload a screenshot to sample colors locally, or nudge lightness while preserving hue to hit a target ratio.
Upload a screenshot or design export. The image stays in your browser — nothing is uploaded.
Click or tap a pixel in the uploaded image, then apply the picked color to the checker.
No image yet. Upload one to start sampling colors.
Nudge lightness while preserving hue and saturation. HSL-based for V2; OKLCH upgrade is planned.
Live contrast
17.40:1
Normal text AA target reached(4.50:1)
The planned scanner will accept a URL and report failing text and UI contrast across the page. It will ship as a separate tool when the scan is real.
The planned extension will sample pixels on live pages and run WCAG checks inline. No install button will appear until the extension exists.
Save color pairs locally, reuse recent checks, copy a full report, or export a clean PNG summary.
No saved color pairs yet.
Your recent checks will appear here.
Current report: #1A1A1A on #FFFFFF, 17.40:1. Saved colors and recent checks stay in this browser only.
Minimum and enhanced contrast ratios from the Web Content Accessibility Guidelines 2.2.
| Use case | AA minimum | AAA enhanced | Notes / examples |
|---|---|---|---|
| Normal text | 4.5:1 | 7:1 | Body text, labels, links, helper text |
| Large text | 3:1 | 4.5:1 | 18pt / 24px regular or 14pt / 18.66px bold and above |
| UI components & graphics | 3:1 | — | Buttons, icons, input borders, focus indicators, meaningful graphics |
AA is the common baseline target for accessible digital products. AAA is stricter and typically applied to long-form reading or highly accessible interfaces. WCAG does not define a separate AAA threshold for non-text UI components.
These contrast ratios are based on Web Content Accessibility Guidelines (WCAG) 2.2 to help ensure text, interface components, and meaningful graphics are perceivable for users with low vision and other visual impairments.
Learn more about WCAG 2.2Every WCAG contrast check this tool covers — text, buttons, icons, palettes, CSS, and Tailwind — on one page.
Validate body text, labels, helper copy, and link text against WCAG AA (4.5:1) and AAA (7:1) for normal text. Adjust font size and weight to see how thresholds change.
Test default, hover, and disabled button states. The Button preview tab uses your selected colors so low-contrast secondary or muted states show up immediately.
Icons that convey meaning need at least 3:1 against their background. Use the Icon preview tab to verify status, navigation, and toolbar icons against the WCAG non-text threshold.
Input borders, focus rings, toggles, and other interactive controls follow the 3:1 non-text rule. The UI Components result panel checks this automatically alongside text results.
Compare every color pair in a palette at once with the Palette Contrast Matrix above. Click any cell to push the pair back into the main checker for a closer look.
Paste HEX, RGB, RGBA, HSL, or HSLA values directly. The tool normalizes inputs, blends alpha against the white canvas, and emits ready-to-copy CSS variables for design tokens.
Copy either arbitrary-value classes like text-[#1A1A1A] or the nearest default Tailwind tokens, with a confidence label when the mapping is approximate.
Pass/fail is computed from the raw unrounded ratio and matches the thresholds in the WCAG requirements table above — 4.5:1 and 7:1 for text, 3:1 for non-text.