🎨 Color Contrast Checker — WCAG AA & AAA Live

Color Contrast Checker WCAG AA & AAA Live Ratio — Text, Large Text & UI Components

Pick any two colors using the live color pickers or enter values in HEX, RGB, or HSL format. The WCAG 2.1 contrast ratio updates in real time. All five compliance checks are shown simultaneously: AA Normal text (4.5:1), AA Large text (3:1), AA UI components (3:1), AAA Large text (4.5:1), and AAA Normal text (7:1). If a check fails, the auto-fix panel suggests the nearest foreground color that passes. Color blindness simulation shows how your pair looks to users with deuteranopia, protanopia, and tritanopia. Copy the CSS output directly into your stylesheet. All calculations run in your browser — nothing is sent anywhere.

Live color picker5 WCAG checksColor blindness simAuto-fix suggestions
AdSense — 728×90 Leaderboard
🎨 Color Contrast Checker

Pick Colors — WCAG Ratio Updates Live

Use the color pickers or enter HEX, RGB, or HSL values. All 5 WCAG checks update instantly.

Foreground
Text, icon, button border
Background
Page, card, button fill
Common pairs
Contrast Ratio
FG luminance:
BG luminance:
WCAG 2.1 Compliance
Live preview
Normal text (body, paragraphs)
The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs.
Large text (heading)
Heading example Aa Bb Cc
■ Button example
CSS output

      
🧪 Auto-fix suggestions
👁️ Color blindness simulation

Approximate simulation using color vision deficiency transforms. Deuteranopia affects ~1% of males (green-blind). Protanopia ~1% (red-blind). Tritanopia ~0.01% (blue-blind).

AdSense — 728×90 Leaderboard

WCAG contrast requirements quick reference

WCAG AA Normal Text
4.5:1 minimum
Text below 18pt / 24px
Required byADA, EAA, Section 508
Common pass#767676 on white
Black on white21:1 (max)
Passes forMost body text
📏
WCAG AA Large Text
3:1 minimum
18pt+ or 14pt bold
Large text24px+ regular
Bold large18.5px+ bold
Also forUI components, icons
More flexibilityAllows lighter colors
WCAG AAA Normal
7:1 enhanced
Highest standard
Recommended forHealthcare, government
Common pass#595959 on white
CoversLow vision users
Not mandatoryBest practice
🧠
The Formula
WCAG algorithm
How ratios are calculated
Ratio(L1+0.05)/(L2+0.05)
Luminance0.2126R+0.7152G+0.0722B
Range1:1 (same) to 21:1
StandardWCAG 2.1 / W3C
🎯
Need a full WCAG audit of your website colours?
Use the CSS Specificity Calculator to understand which CSS rules control your text and background colors — helping you find and fix the right declarations for accessibility compliance.
CSS Specificity Calculator →
⭐ Ratings

Rate this tool

4.9
★★★★★
Based on 43,100 ratings
5
10,120
4
435
3
218
2
109
1
0
Was this your design photo guide helpful?
Thank you! G'day!
What Is Color Contrast?

Color Contrast & WCAG — Why It Matters and How It Is Measured

Color contrast is the difference in perceived brightness between two colors. When text has insufficient contrast against its background, it becomes difficult or impossible to read for users with low vision, color blindness, or visual fatigue. According to WebAIM’s 2024 Million report, color contrast is the single most common accessibility failure on the web — present on 83.6% of all websites tested. It is simultaneously the most impactful and easiest accessibility improvement you can make.

The WCAG 2.1 contrast ratio formula

WCAG (Web Content Accessibility Guidelines) defines contrast mathematically using relative luminance — a perceptual measure of how bright a color appears to the human eye, expressed as a value between 0 (absolute black) and 1 (absolute white). The formula first linearizes the sRGB values to remove gamma encoding, then weights the three channels by their contribution to human luminance perception: 0.2126 for red, 0.7152 for green, 0.0722 for blue. The extremely high green weight reflects that the human eye is most sensitive to green wavelengths in its M-cone cells.

The contrast ratio is then: (L1 + 0.05) / (L2 + 0.05), where L1 is the relative luminance of the lighter color and L2 is the relative luminance of the darker color. The +0.05 offset prevents division by zero for absolute black and anchors the scale. The ratio ranges from 1:1 (identical colors, no contrast) to 21:1 (black #000000 on white #FFFFFF).

The five WCAG compliance checks explained

CheckRatio requiredApplies toStandard
AA Normal text4.5:1Body text, UI labels, links (text below 18pt / 24px regular, or 14pt / 18.5px bold)WCAG 2.1 §1.4.3
AA Large text3:1Heading text at 18pt+ regular (24px+) or 14pt+ bold (18.5px+)WCAG 2.1 §1.4.3
AA UI components3:1Button borders, input field borders, icons, focus indicators — non-text elementsWCAG 2.1 §1.4.11
AAA Large text4.5:1Same as AA Large text but at enhanced levelWCAG 2.1 §1.4.6
AAA Normal text7:1Same as AA Normal text but at enhanced levelWCAG 2.1 §1.4.6
Common Examples

Color Contrast Reference — Common Color Combinations & Their Ratios

Click any pair in the preset buttons above the calculator to load them instantly.

ForegroundBackgroundRatioAA NormalAA LargeAAA
#000000 (Black)#FFFFFF (White)21:1PASSPASSPASS
#FFFFFF (White)#000000 (Black)21:1PASSPASSPASS
#595959#FFFFFF (White)7.0:1PASSPASSPASS (AAA!)
#767676#FFFFFF (White)4.54:1PASSPASSFAIL
#999999#FFFFFF (White)2.85:1FAILFAILFAIL
#0066CC#FFFFFF (White)5.74:1PASSPASSFAIL
#1D4ED8#EFF6FF7.04:1PASSPASSPASS (AAA!)
#6366F1#FFFFFF (White)4.47:1FAIL (just!)PASSFAIL
#FFFFFF#6366F14.47:1FAIL (just!)PASSFAIL
#000000#FBBF24 (Amber)11.67:1PASSPASSPASS (AAA!)

Note: Our brand color #6366f1 (indigo-500 in Tailwind) has a 4.47:1 ratio on white — just barely failing AA for normal text. This is a known characteristic of indigo-500 — use it as an accent or heading color, not for body text on white.

Legal Requirements
⚖️
United States — ADA and Section 508 — The Americans with Disabilities Act (ADA) requires websites serving the public to be accessible. While the ADA does not specify WCAG directly in its text, US courts have consistently ruled that WCAG 2.1 Level AA is the benchmark for accessibility compliance. Notable cases including Robles v. Domino’s Pizza (2019) and other ADA website litigation have cited color contrast failures as accessibility violations. The DOJ’s 2024 rule explicitly adopted WCAG 2.1 AA for state and local government websites. Section 508 requires federal government agencies and contractors to meet WCAG 2.0 Level AA.
🇪🇺
European Union — EAA (European Accessibility Act) — The European Accessibility Act (Directive 2019/882) became mandatory from 28 June 2025 for products and services including websites, mobile apps, e-commerce, banking, and telecommunications sold in the EU. It references EN 301 549 which in turn references WCAG 2.1 Level AA as the technical standard. Non-compliance may result in market access restriction and fines. All EU-facing websites and apps targeting consumers must now meet WCAG 2.1 AA, including all contrast requirements.
🇬🇧
United Kingdom — Public Sector Bodies Accessibility Regulations — The UK Public Sector Bodies (Websites and Mobile Applications) Accessibility Regulations 2018 require UK public sector organisations to meet WCAG 2.1 Level AA. Private sector requirements are covered by the Equality Act 2010, which requires reasonable adjustments for disabled users. The UK adopted EN 301 549 (which references WCAG 2.1 AA) as its accessibility standard post-Brexit.
Fixing Contrast Issues

How to Fix Color Contrast Accessibility Issues

The auto-fix suggestions above are the fastest starting point. Here is the broader strategy.

➡️
Darken the text color — most common fix — If your text is too light on a white or light background, darken it by reducing the L (lightness) value in HSL. Keep the same hue and saturation to stay on-brand. The auto-fix button in this tool finds the minimum lightness adjustment needed to pass. For colored text (blue, green, red), darkening by 10–20% lightness points often achieves AA compliance while keeping the color identity.
➡️
Lighten the background — second most common fix — If you are using a colored background, lightening it towards white increases contrast for dark text on top. Moving from a mid-range background to a very light tint (5–10% lightness) significantly boosts contrast while keeping the color family. Light blue, light green, and light purple backgrounds all work well with dark text.
➡️
Use white text on dark backgrounds instead of black on light — Dark backgrounds with white text can be highly accessible. White (#FFFFFF) on your brand’s primary dark color is often the best solution for maintaining visual identity. The trade-off is that extremely dark backgrounds (pure black) can cause halation for users with astigmatism — consider #121212 or #1e1e1e instead of #000000.
➡️
Large text has more flexibility — design your type scale — Remember that WCAG only requires 3:1 for large text (18pt+ / 24px+). Design your type scale to use large text for section headings where your brand color may not achieve 4.5:1 on all backgrounds. Use darker shades for body text where the 4.5:1 requirement applies. This lets you keep vibrant brand colors in headings while ensuring body text is fully compliant.
➡️
Do not rely solely on color — provide additional cues — WCAG 1.4.1 requires that color is not the only visual means of conveying information. For links, do not remove underlines unless the link text has 3:1 contrast against surrounding body text (in addition to 4.5:1 against the background). For form errors, show both a red border AND an error icon or message text. For charts, use patterns in addition to colors.
Comparison

LazyTools vs Other Color Contrast Checkers

FeatureLazyToolsWebAIMCoolorscolourcontrast.cc
Live visual color picker✅ Both colors✅ Yes✅ Yes✅ Yes
HEX + RGB + HSL input✅ All 3 formats⚠ HEX/RGB only⚠ HEX/RGB only⚠ HEX/RGB
All 5 WCAG checks simultaneously✅ AA+AAA text+large+UI⚠ 4 checks (no UI)⚠ 4 checks✅ Yes
Auto-fix suggestion✅ Nearest passing color⚠ Lightness slider❌ None❌ None
Color blindness simulation✅ 4 types with ratio❌ None❌ None❌ None
CSS output✅ Copy-ready❌ None❌ None❌ None
Relative luminance shown✅ Both colors❌ No❌ No❌ No
No account required✅ Yes✅ Yes✅ Yes✅ Yes
FAQ

Color Contrast FAQ

WCAG Level AA: 4.5:1 for normal text, 3:1 for large text (18pt+) and UI components. WCAG Level AAA: 7:1 for normal text, 4.5:1 for large text. Enter any two colors above to check all five WCAG ratios instantly.

WCAG formula: (L1 + 0.05) / (L2 + 0.05) where L = relative luminance (0 to 1). Relative luminance = 0.2126R + 0.7152G + 0.0722B (linearized sRGB). Ranges from 1:1 (same color) to 21:1 (black on white).

AA is the minimum standard required by most laws (ADA, EAA, Section 508): 4.5:1 for text. AAA is enhanced: 7:1 for text. Most organisations target AA. AAA is recommended for healthcare, government and financial apps. Both are checked simultaneously above.

18pt (24px at 96dpi) or larger regular weight, or 14pt (18.5px) or larger bold. Large text requires only 3:1 for AA. Normal text below these sizes requires 4.5:1. Headings are often large text; body text is almost always normal text.

Use the live color pickers or enter HEX, RGB, or HSL values. Contrast ratio updates instantly. All 5 WCAG checks shown. Auto-fix suggestions find the nearest passing color. Color blindness simulation. CSS output. Free, no account, browser-side.

1. Identify text color (foreground) and background color. 2. Enter both in the pickers above. 3. Check contrast ratio against your target: 4.5:1 for AA normal text. 4. If failing, click the auto-fix suggestion to find a passing alternative.

The WCAG Level AA minimum for normal text. #767676 on white achieves exactly 4.54:1 — the minimum passing gray. Any lighter gray on white fails AA. Black on white achieves 21:1. Enter any color in the checker above to see its exact ratio.

Yes. Always measure foreground against the actual background behind it. For gradient backgrounds, check at the point of lowest contrast. For text on images, check the rendered color (darkest and lightest parts). Semi-transparent overlays require checking the composited color.

Perceptual brightness 0-1. Formula: 0.2126R + 0.7152G + 0.0722B (linearized). The high green weight (71.52%) reflects human color sensitivity. Shown for both colors above the ratio in this checker.

On white (#FFF), colors need relative luminance ≤ 0.18 for 4.5:1. Dark blues, dark greens, dark reds pass. #767676 is the minimum passing gray. Light colors (yellow, light pink, light blue) all fail on white. Enter any color to test instantly.

Shows how your color pair appears to users with color vision deficiencies: Deuteranopia (green-blind, ~1% of males), Protanopia (red-blind, ~1%), Tritanopia (blue-blind, ~0.01%). A pair passing normal contrast may look very different to colorblind users. Check all 4 views in the simulation section above.

1. Darken foreground color (reduce HSL lightness). 2. Lighten background towards white. 3. Use the auto-fix button — it finds the nearest passing color. 4. Consider a different hue with better contrast properties. 5. Use large text where possible (requires only 3:1).

In many jurisdictions, yes. US: ADA (WCAG AA interpreted as standard), Section 508 (federal). EU: European Accessibility Act (WCAG 2.1 AA mandatory from June 2025). UK: Public sector must meet WCAG 2.1 AA. Private sector: Equality Act applies.

WCAG 2.2 (2023) did not change the contrast ratio requirements. They remain 4.5:1 (AA normal), 3:1 (AA large/UI), 7:1 (AAA normal). WCAG 2.2 added focus indicator contrast requirements and other criteria, but the core luminance formula and thresholds are unchanged from 2.1.

#767676 has exactly 4.54:1 on white — the minimum gray that passes WCAG AA for normal text. Any lighter gray fails AA on white. Click the "Min AA" preset button above to see this pair instantly.

WCAG 2.1 §1.4.11 requires 3:1 for UI components. Check: button border vs page background (3:1), button text vs button background (4.5:1). The "AA UI components" check in this tool shows the 3:1 check. Enter the button border color as foreground and page background as background to verify.

Related tools

More Free Developer & Design Tools