Test your color combinations for WCAG 2.1 AA & AAA compliance. Ensure your website is accessible to everyone.
Choose your foreground (text) and background colors using the color picker, hex code, or RGB values.
The tool calculates the contrast ratio using the WCAG 2.1 relative luminance formula in real-time.
See at a glance whether your colors pass AA and AAA standards for both normal and large text.
If your colors fail, the tool suggests accessible alternatives that maintain a similar look and feel.
A contrast checker is an essential web accessibility tool that measures the difference in luminance between two colors — typically your text color (foreground) and the surface it sits on (background). This difference is expressed as a contrast ratio, which ranges from 1:1 (identical colors, zero contrast) to 21:1 (black on white, maximum possible contrast).
Web Content Accessibility Guidelines (WCAG 2.1), published by the World Wide Web Consortium (W3C), defines specific minimum contrast ratios that websites must meet to be considered accessible. These standards exist because millions of people worldwide live with visual impairments — including color blindness, low vision, cataracts, and age-related vision decline. Without sufficient contrast, these users cannot read or navigate websites effectively.
| Level | Text Type | Minimum Ratio |
|---|---|---|
| AA | Normal text (<18px) | 4.5 : 1 |
| AA | Large text (≥18px bold or ≥24px) | 3 : 1 |
| AAA | Normal text | 7 : 1 |
| AAA | Large text | 4.5 : 1 |
The calculation uses the relative luminance of each color, defined in the sRGB color space. Each RGB channel value is first linearized (since sRGB uses a gamma curve), then combined using a weighted formula that accounts for human eye sensitivity: L = 0.2126 × R + 0.7152 × G + 0.0722 × B. The contrast ratio is then: (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter and L2 is the darker luminance value.
Accessible contrast doesn't just help people with diagnosed visual impairments. It also benefits users viewing screens in bright sunlight, people using low-brightness settings to save battery, older adults whose contrast sensitivity naturally decreases with age, and even users with temporary conditions like eye strain or migraines. In short, better contrast means a better experience for everyone.
This ToolGalaxy Contrast Checker follows the official W3C algorithm precisely, giving you accurate, reliable results you can trust for your accessibility audits, design reviews, and compliance documentation.