Color Contrast Checker
Calculate foreground and background contrast ratios compliant with WCAG 2.1 AA and AAA standards, and get smart suggested compliant color adjustments.
Interactive Preview Canvas
Large Header Typography
This is a sample normal paragraph (16px) demonstrating the selected contrast combination.
Related tools
Get to know this tool
What is the Color Contrast Checker Tool?
Color Contrast Checker is a free web utility that calculates the contrast ratio between a text (foreground) color and a background color, then tells you whether that combination meets the WCAG 2.1 accessibility guidelines. Just like every tool on this site, it runs entirely inside your browser — your color values are never sent to any server.
How the Contrast Ratio Is Calculated
The tool follows the official WCAG formula:
- Each color's relative luminance is calculated from its sRGB values using the standard linearization curve and the 0.2126 / 0.7152 / 0.0722 coefficients for red, green, and blue.
- The contrast ratio is then computed as
(L1 + 0.05) / (L2 + 0.05), whereL1is the luminance of the lighter color andL2is the luminance of the darker one. - The result is a ratio between 1:1 (no contrast, identical colors) and 21:1 (maximum contrast, pure black on pure white).
Key Features of Color Contrast Checker
- Live Color Pickers: Pick your text and background colors with the built-in color pickers, or type a hex code directly (3-digit shorthand like
#000or full 6-digit like#000000, with or without the#). - Instant Sample Preview: See your actual text and background combination rendered live, so you know exactly what readers will see.
- Full WCAG 2.1 Breakdown: The tool checks your ratio against all four official thresholds at once — AA Normal Text (4.5:1), AA Large Text (3:1), AAA Normal Text (7:1), and AAA Large Text (4.5:1) — and marks each as PASS or FAIL.
- Invalid Input Handling: If you type an incomplete or invalid hex code, the tool clearly flags it instead of showing a misleading result.
- Fully Offline & Private: All calculations happen locally in your browser. There are no network requests, no tracking, and no data ever leaves your device.
How to Use This Tool?
- Choose your text color using the color picker or by typing a hex code.
- Choose your background color the same way.
- Instantly read the calculated contrast ratio and see whether it passes the AA and AAA levels for both normal-sized and large text.
- Adjust either color until you reach the accessibility level you need, using the live sample preview to check readability.
Understanding WCAG AA and AAA Levels
- AA (minimum, widely required level): 4.5:1 for normal text, 3:1 for large text (18pt+ or 14pt+ bold).
- AAA (enhanced level): 7:1 for normal text, 4.5:1 for large text.
Meeting at least AA is recommended for any public-facing website to ensure text remains readable for users with low vision or color-vision deficiencies.
Why Choose Our Client-Side Tool?
Many online contrast checkers send your color values to a remote server to perform the calculation. This tool computes everything locally using your browser's own math engine, so there is zero network latency and zero risk of your design choices being logged anywhere.