How do I check color contrast for accessibility (WCAG)?
Enter a foreground and background color to instantly see the contrast ratio and whether it passes WCAG 2.1 AA and AAA standards for normal text, large text, and UI components. The tool shows pass/fail badges for each level. Everything runs in your browser.
Text: #1F2937 Background: #FFFFFF
Contrast ratio: 15.4:1 WCAG AA: Pass (normal + large) WCAG AAA: Pass (normal + large)
Color Contrast Checker
Check the contrast ratio between two colors for WCAG 2.1 accessibility compliance. Ensure your text is readable for all users.
Contrast Ratio
14.68:1
Excellent
Live Preview
Large Text (24px bold)
Normal body text at 16px. This is what most of your content will look like. Make sure it's easy to read for all users, including those with visual impairments.
Small text at 14px — captions, footnotes, and secondary content.
WCAG 2.1 Compliance
Presets
About WCAG Color Contrast
The Web Content Accessibility Guidelines (WCAG) define minimum contrast ratios to ensure text is readable by people with moderately low vision or color deficiencies.
AA Normal Text requires a contrast ratio of at least 4.5:1. This applies to body text under 18pt (24px) or under 14pt (18.66px) bold.
AA Large Text requires at least 3:1. Large text is defined as 18pt+ (24px+) or 14pt+ (18.66px+) bold.
AAA is the enhanced level — 7:1 for normal text and 4.5:1 for large text. This is recommended for long-form content and critical UI.
UI Components like icons, borders, and form controls require at least 3:1 contrast against adjacent colors (WCAG 2.1 Success Criterion 1.4.11).
The contrast ratio is calculated using the relative luminance of each color. The formula is: (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color's luminance.
Tips & Best Practices
WCAG AA requires 4.5:1 for normal text, 3:1 for large text
Large text is defined as 18pt (24px) regular weight or 14pt (18.66px) bold. Logos and decorative text are exempt. For AAA (enhanced) compliance: 7:1 for normal text, 4.5:1 for large text. Meeting AA is legally required in many jurisdictions (ADA, EAA, EN 301 549). AAA is best practice for public-facing content.
Contrast ratios don't account for thin font weights
WCAG contrast calculations use luminance values, not font weight. But a 400-weight font at 4.5:1 contrast is more readable than a 300-weight font at the same ratio. Light and thin font weights (100-300) need higher contrast to be legible, especially at small sizes. Use 500+ weight for body text.
Semi-transparent text has variable contrast
Text with opacity: 0.7 or color: rgba(0,0,0,0.6) has different effective contrast depending on the background behind it. Over a white background it might pass, but over an image it might fail. Calculate contrast against the worst-case background. For text over images, add a solid or gradient overlay.
Low contrast can be a dark pattern
Deliberately low-contrast text for unsubscribe links, terms of service links, or opt-out options is a dark pattern that may violate accessibility laws and FTC guidelines. The EU's Digital Services Act explicitly addresses deceptive interface design. Ensure all interactive elements meet minimum contrast requirements.
Frequently Asked Questions
What is WCAG color contrast and why does it matter?
How do I check if my colors meet WCAG accessibility standards?
What is the minimum contrast ratio for accessible text?
Related Inspect Tools
XPath Tester
Test XPath expressions against XML data with real-time evaluation — select elements, filter by attributes, navigate axes, and use XPath functions
SQL Playground
Run SQL queries in your browser with a full SQLite database powered by WebAssembly — practice JOINs, CTEs, window functions, aggregations, and more
JWT Decoder
Decode and inspect JSON Web Tokens instantly
Regex Tester
Test regular expressions with real-time match highlighting