Color contrast checker
Enter a text color and a background color to see the contrast ratio and which WCAG levels pass.
Large text looks like this
Normal body text at 16px. The quick brown fox jumps over the lazy dog.
Button outlineContrast ratio
| Use | Level | Needs | Result |
|---|---|---|---|
| Normal text | AA | 4.5:1 | Pass |
| Normal text | AAA | 7:1 | Fail |
| Large text | AA | 3:1 | Pass |
| Large text | AAA | 4.5:1 | Pass |
| UI components & icons | AA | 3:1 | Pass |
Closest text color that passes AA:
#264653 Runs entirely in your browser. Your files and colors never leave your device.
How to use the contrast checker
- Type or pick a text color and a background color (HEX, RGB, HSL or a color name).
- Read the ratio and the pass/fail results for normal text, large text and UI components.
- If a level fails, click “Use suggested color” to get the closest color that passes.
- Share the result: the URL keeps both colors.
How it works
The ratio follows WCAG 2.2: (L1 + 0.05) / (L2 + 0.05), where L is the relative luminance of the lighter and darker color. AA needs 4.5:1 for normal text and 3:1 for large text (18pt, or 14pt bold) and UI components; AAA needs 7:1 and 4.5:1. Ratios are compared unrounded, so 4.49:1 fails AA. Suggestions keep the hue and change only lightness, searched in OKLCH.
Try it with popular colors
Related tools
Color Converter Paste a color in any format (HEX, RGB, HSL, OKLCH or a CSS name) and copy it in every other format. Palette Generator Press Generate (or the space bar) for a new palette. Lock colors you like and they stay put. Gradient Generator Pick 2–5 colors, choose the type and angle, and copy CSS that blends smoothly in modern color spaces.