Color Contrast Checker
Check color contrast ratios for WCAG 2.1 accessibility compliance. Test foreground and background color combinations against AA and AAA standards with live preview. All processing happens in your browser.
What is a Color Contrast Checker?
A color contrast checker measures the visual contrast between two colors — typically text and its background — and determines whether the combination meets accessibility standards set by the Web Content Accessibility Guidelines (WCAG). The contrast ratio is a mathematical calculation based on the relative luminance of each color, producing a number between 1:1 (no contrast) and 21:1 (maximum contrast, black on white or vice versa).
WCAG 2.1 defines specific contrast thresholds that ensure text is readable for people with normal vision and people with low vision or color vision deficiency. The two primary levels are AA (minimum) and AAA (enhanced). For normal text (under 18pt or 14pt bold), the AA minimum is 4.5:1 and AAA is 7:1. For large text (18pt+ or 14pt+ bold), the AA minimum is 3:1 and AAA is 4.5:1.
When Should You Check Color Contrast?
Color contrast checking should be part of every design and development workflow. Web designers testing color palettes for accessibility compliance. Frontend developers verifying that UI text meets WCAG standards before launch. Content creators ensuring blog and article text is readable. Marketing teams checking that promotional material is accessible to all audiences.
UX designers building inclusive interfaces test button text, form labels, error messages, and inactive text against their backgrounds. Product managers reviewing designs for accessibility before sprint planning. QA testers verifying accessibility requirements are met. Anyone creating digital content should verify contrast ratios.
How It Works
The checker converts your foreground and background colors to relative luminance values using the sRGB color space, then calculates the contrast ratio using the WCAG formula. It compares the ratio against the four WCAG thresholds (AA normal, AA large, AAA normal, AAA large) and shows pass/fail for each. The live preview shows your text on the background color in real time.
Limitations
This tool checks color contrast only — it does not test font size, weight, or rendering quality, which also affect readability. The contrast calculation uses the sRGB color space, which is standard for web content but may not match print or wide-gamut displays. Some edge cases with very dark or very light colors may produce unexpected ratios due to floating-point precision. The tool does not test non-text elements like icons, borders, or focus indicators.
Tips for Best Results
Aim for AAA compliance whenever possible — it provides a better experience for all users, not just those with accessibility needs. Test all interactive elements: buttons, links, form inputs, and focus states. Remember that contrast applies to all text, including default text in form fields and disabled button text. Use this tool alongside a color blindness simulator to ensure your palette works for all users.
Features
How to Use
Enter your foreground (text) color as hex, RGB, or HSL — or use the color picker
Enter your background color using the same methods
Check the contrast ratio and AA/AAA pass/fail results
View the live preview to see how your text looks on the background
Adjust colors until all WCAG thresholds pass
Frequently Asked Questions
What is a good contrast ratio for text?
Does this tool test non-text elements like icons?
What is the difference between AA and AAA?
What counts as large text?
Related Tools
Color Format Converter
Convert color formats between HEX, RGB, RGBA, HSL, and HSLA instantly with this free online tool. Perfect for web designers, frontend developers, and UI/UX professionals who frequently work with different color systems. Features an interactive color picker for visual selection and displays all format variations simultaneously. All conversions happen locally in your browser with no data sent to external servers.
Color Palette Generator
Generate beautiful, harmonious color palettes instantly with this free online tool. Press the spacebar to randomize new palettes, lock colors you love, and export your creation as CSS, JSON, or SCSS variables. Perfect for designers exploring color schemes, developers building design systems, or anyone seeking color inspiration. Features accessibility contrast checks and works entirely in your browser for privacy.
Color Palette Extractor
Extract a curated color palette from any image with this free online tool. Upload a photo, screenshot, or design mockup and instantly get the dominant colors as HEX codes and CSS custom properties. Perfect for designers creating brand palettes from inspiration images, developers matching UI colors to reference screenshots, or anyone who needs to identify exact colors from visual assets. All processing happens in your browser.
Color Blindness Simulator
Simulate how your designs appear to people with different types of color vision deficiency using this free online accessibility tool. Test any color against 8 types of color blindness — protanopia, deuteranopia, tritanopia, achromatopsia, and more — to ensure your interfaces are accessible to everyone. Choose colors via the color picker or paste hex, RGB, or HSL values. Essential for UX designers, frontend developers, and anyone building inclusive digital products. All simulation happens locally in your browser with zero data upload.