How to use
- Enter text and background colors.
- Read the ratio and pass/fail for each level.
- Use a suggested color that passes while staying close to yours.
Worked example
#767676 on white is 4.54:1, which passes AA for normal text (4.5:1) but fails AAA (7:1).
Supported formats and limits
| Input | Two colors (hex, rgb, hsl, oklch) |
|---|---|
| Output | Ratio, pass/fail, suggestions |
| Engine | WCAG 2.x relative luminance formula |
Limitations
- Contrast ratio is one part of readability; font weight and size also matter.
- A passing ratio for one color pair is not an accessibility certification for a page or site.
Questions
What contrast ratio do I need for WCAG AA?
At least 4.5:1 for normal text and 3:1 for large text (about 24 px, or 18.66 px bold). AAA asks for 7:1 and 4.5:1. Enter your two colors to see the ratio and which levels pass.
What ratios are needed to pass?
WCAG AA needs 4.5:1 for normal text and 3:1 for large text; AAA needs 7:1 and 4.5:1. #767676 on white is 4.54:1, so it passes AA for normal text but fails AAA.
How are the suggested colors chosen?
The tool changes only the OKLCH lightness of the text or the background color, keeping the hue, until the target ratio is reached, and offers the nearest lighter and darker options.
Does a pass mean my site is accessible?
No. It checks one color pair. Accessibility also depends on structure, keyboard use, focus states, alternative text and more; use the accessibility checker and manual testing for those.
Guides
Privacy
Runs on your device. Files and text are processed in this browser tab and are not uploaded.
See the privacy policy for how toolsdocks handles data.