Color Contrast Checker
Check color contrast ratios for WCAG AA and AAA compliance. Ensure your text is readable and accessible.
Color Contrast Checker tool
Example
Input: Foreground #767676 text on background #FFFFFF
Result: 4.54:1 - AA Normal Text PASS, AA Large Text PASS, AAA Normal Text FAIL, AAA Large Text PASS
The ratio is (L1 + 0.05) / (L2 + 0.05) using the relative luminance of each color. #767676 is the lightest gray that still meets the 4.5:1 AA minimum for normal text on white.
Contrast Ratios for Common Color Pairs
| Text on background | Ratio | AA normal | AAA normal |
|---|---|---|---|
| #000000 on #FFFFFF | 21.00:1 | Pass | Pass |
| #333333 on #FFFFFF | 12.63:1 | Pass | Pass |
| #0000FF on #FFFFFF | 8.59:1 | Pass | Pass |
| #595959 on #FFFFFF | 7.00:1 | Pass | Pass |
| #008000 on #FFFFFF | 5.13:1 | Pass | Fail |
| #767676 on #FFFFFF | 4.54:1 | Pass | Fail |
| #777777 on #FFFFFF | 4.47:1 | Fail | Fail |
| #FF0000 on #FFFFFF | 3.99:1 | Fail | Fail |
| #FFFFFF on #C4653A | 3.98:1 | Fail | Fail |
| #949494 on #FFFFFF | 3.03:1 | Fail | Fail |
| #FFA500 on #FFFFFF | 1.97:1 | Fail | Fail |
| #FFFFFF on #FFFF00 | 1.07:1 | Fail | Fail |
Computed with the checker, ratios cut to 2 decimals. Every pair from 3:1 up passes AA for large text.
- Enter a foreground (text) color as a hex code in the Foreground (Text) field.
- Enter a background color as a hex code in the Background field, or use Swap Colors to reverse the pair.
- View the calculated contrast ratio and the pass/fail status for WCAG AA and AAA levels for both normal and large text sizes.
- Preview a live sample of your text rendered on the background color to visually assess readability.
- Adjust either color until the combination passes your target WCAG level, then use Copy Ratio to copy the contrast ratio for your documentation.
WCAG Contrast Ratios Explained
A contrast ratio compares how bright two colors are, from 1:1 (the same color) to 21:1 (black on white). WCAG asks for at least 4.5:1 for normal text and 3:1 for large text at level AA. This checker works out the ratio for your text and background colors and shows pass or fail for AA and AAA.
The ratio is based on relative luminance, which measures how much light a color gives off, weighted the way our eyes respond. Green counts most, then red, then blue. That is why pure blue text on white passes easily at 8.59:1, while pure red only reaches 3.99:1, even though both look strong.
WCAG has two levels for text. AA is the level most accessibility laws and policies refer to: 4.5:1 for normal text and 3:1 for large text. AAA is stricter, at 7:1 and 4.5:1. Large text means at least 24px regular, or about 18.66px bold. The tool also gives a quick rating: Excellent from 7:1, Good from 4.5:1, Fair from 3:1 and Poor below that.
The ratio is cut off at two decimals rather than rounded. A pair at 4.497:1 shows as 4.49:1 and fails, so you never see a pass the math does not support. Swap Colors flips the pair; the ratio stays the same, and the two previews show both versions. To see how your colors look with color blindness, try the Color Blindness Simulator.
Formula / How It Works
Sources
Frequently Asked Questions
Related Tools
Color Picker
Pick any color visually and get values in hex, RGB, HSL, and CMYK. Interactive saturation panel and hue slider.
Color ToolsColor Palette Generator
Generate harmonious color palettes. Create complementary, analogous, triadic, and split-complementary schemes.
Color ToolsHex to RGB Converter
Convert hexadecimal color codes to RGB values instantly. Supports shorthand and 8-digit hex with alpha.
Color Tools