Color Contrast Checker
Check color contrast ratios for WCAG 2.1 AA and AAA compliance with real-time calculation and pass/fail indicators.
The quick brown fox jumps over the lazy dog
This is a preview of normal body text at 16px. Check how readable this text appears against the background color. Good contrast ensures that all users, including those with visual impairments, can read your content comfortably.
Small text (14px) requires even better contrast to remain legible.
Contrast Ratio
17.06:1
Excellent contrast - passes all WCAG criteria
AA Normal Text
Pass
AA Large Text
Pass
AAA Normal Text
Pass
AAA Large Text
Pass
WCAG 2.1 Contrast Requirements
Level AA (Minimum)
- Normal text: 4.5:1 minimum
- Large text (18pt+): 3:1 minimum
- UI components: 3:1 minimum
Level AAA (Enhanced)
- Normal text: 7:1 minimum
- Large text (18pt+): 4.5:1 minimum
Related Tools
Color Converter
Convert colors between HEX, RGB, HSL, CMYK, and more formats instantly.
Palette Generator
Generate beautiful, accessible color palettes with WCAG compliance checking. Extract colors from images and export to CSS/JSON.
Color Picker
Pick any color from screen or input. Get HEX, RGB, HSL values instantly.
Gradients
Create beautiful CSS gradients with a visual editor. Linear, radial, and conic gradients.
Frequently Asked Questions
What is a color contrast ratio?
What are the WCAG contrast requirements?
What is the difference between WCAG AA and AAA?
How is relative luminance calculated?
Why does color contrast matter for accessibility?
What counts as "large text" in WCAG?
Can I use this tool for UI component colors?
Is this tool accurate?
How to Use the Color Contrast Checker
Ensuring adequate color contrast between text and background is one of the most critical aspects of web accessibility. Our color contrast checker calculates the contrast ratio between any two colors and instantly tells you whether the combination meets WCAG 2.1 Level AA and Level AAA requirements for both normal and large text.
Step 1: Choose your foreground color. Use the color picker or enter a hex code for your text or foreground element. The tool accepts standard 6-digit hex codes with or without the # prefix. The color picker provides a visual interface for exploring different hues, saturation levels, and brightness values.
Step 2: Choose your background color. Select or enter the background color behind your text. The tool immediately calculates the contrast ratio between the two colors and displays the result. You can see a live preview of how your text will look against the chosen background, making it easy to evaluate readability at a glance.
Step 3: Check the compliance results. The tool displays pass/fail badges for four WCAG criteria: AA Normal Text (4.5:1), AA Large Text (3:1), AAA Normal Text (7:1), and AAA Large Text (4.5:1). Green badges indicate passing combinations while red badges indicate failing ones. Aim for at least AA compliance for all text on your website.
Understanding WCAG Color Contrast Guidelines
The Web Content Accessibility Guidelines (WCAG) 2.1 established specific contrast ratio requirements to ensure web content is readable by people with visual impairments. These guidelines are not just best practices; they are legal requirements in many jurisdictions. The Americans with Disabilities Act (ADA) in the United States, the European Accessibility Act, and similar laws worldwide reference WCAG as the standard for web accessibility compliance.
The contrast ratio is calculated using the relative luminance of two colors. Relative luminance represents how bright a color appears to the human eye, accounting for the fact that our eyes are most sensitive to green light, moderately sensitive to red, and least sensitive to blue. The WCAG formula converts sRGB values to linear light values and then applies luminance coefficients (0.2126 for red, 0.7152 for green, 0.0722 for blue) to compute the perceived brightness.
A common misconception is that contrast is simply about light versus dark. In reality, two colors can have very different hues but similar luminance, resulting in poor contrast despite looking "different." For example, a medium green (#6B8E23) on a medium red (#CD5C5C) background may look distinctly different but has a contrast ratio of only 1.5:1, far below the 4.5:1 minimum. This is why checking contrast ratios mathematically is essential rather than relying on visual judgment alone.
Why Color Contrast Matters
Legal compliance. Many countries require websites to meet WCAG 2.1 Level AA standards. Failure to comply can result in lawsuits, fines, and mandatory remediation. In the United States alone, web accessibility lawsuits have increased significantly year over year, with contrast violations being among the most commonly cited issues. Checking contrast during the design phase prevents costly legal problems later.
User experience for everyone. Good contrast is not just for users with visual impairments. Everyone benefits from readable text, especially in challenging viewing conditions like bright sunlight, dimly lit rooms, or on screens with poor color reproduction. Mobile users in particular frequently view websites in variable lighting conditions where low-contrast text becomes unreadable.
Brand accessibility. Many brands struggle with contrast because their brand colors were chosen for aesthetic appeal without considering accessibility. This tool helps designers find accessible color combinations that stay true to brand identity. Often, a small adjustment in lightness or saturation is enough to meet WCAG requirements while preserving the brand look and feel.
Inclusive design philosophy. Designing for accessibility benefits a broader audience than you might expect. Approximately 2.2 billion people worldwide have some form of vision impairment. By ensuring your color combinations meet WCAG standards, you are making your content accessible to the largest possible audience, which is both ethically responsible and commercially smart.
Tips for Achieving Good Color Contrast
Start with your text colors and work outward. Choose a dark text color for light backgrounds or a light text color for dark backgrounds, then adjust until you achieve at least a 4.5:1 ratio. If your brand colors do not meet the minimum ratio, try darkening or lightening one of the colors slightly. Even a 10-15% adjustment in lightness can make the difference between failing and passing WCAG requirements without noticeably changing the visual design.
Test your designs across multiple devices and screen settings. A color combination that looks acceptable on a high-end monitor may fail on a budget laptop screen or an older mobile phone. Use this contrast checker as part of your regular design workflow to catch potential accessibility issues before they reach production.