Design

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

Calculates WCAG 2.1 contrast ratios from foreground and background colors
Tests AA and AAA compliance for both normal and large text
Live preview showing text on background in real time
Supports hex, RGB, and HSL color input formats
Swap and reset actions for quick comparison
100% client-side processing with zero data upload

How to Use

1

Enter your foreground (text) color as hex, RGB, or HSL — or use the color picker

2

Enter your background color using the same methods

3

Check the contrast ratio and AA/AAA pass/fail results

4

View the live preview to see how your text looks on the background

5

Adjust colors until all WCAG thresholds pass

Frequently Asked Questions

What is a good contrast ratio for text?
For normal text, aim for at least 4.5:1 (WCAG AA) or 7:1 (WCAG AAA). For large text (18pt+ or 14pt+ bold), aim for at least 3:1 (AA) or 4.5:1 (AAA). Higher contrast is always better for readability.
Does this tool test non-text elements like icons?
No, this tool specifically tests text contrast. WCAG has separate requirements for non-text elements (graphics, icons, focus indicators) which typically require at least 3:1 contrast against adjacent colors.
What is the difference between AA and AAA?
AA is the minimum accessibility standard — it ensures text is readable for most users. AAA is the enhanced standard — it provides even better readability, especially for people with low vision or color vision deficiency. AAA is recommended when possible.
What counts as large text?
WCAG defines large text as 18pt (24px) or larger, or 14pt (18.66px) bold or larger. Large text has lower contrast requirements because larger characters are easier to read.

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.