How to use it
- Enter the text color and the background color as HEX (#1E293B, #FFF) or rgb(30, 41, 59), or use the color pickers.
- Read the contrast ratio and the pass or fail result for each WCAG level.
- Check the live preview with large text, normal text and a button outline.
- If the colors fail, press “Use this color” to apply the suggested shade, or swap the colors with ⇄.
Common uses
- Checking brand colors for readable text before a website launch.
- Making buttons, links and form borders accessible.
- Fixing accessibility audit findings about low contrast.
- Choosing text colors for slides, posters and social graphics.
- Testing dark-mode color pairs.
Examples
| Text on background | Contrast |
|---|---|
| #000000 on #FFFFFF | 21.00:1 · passes everythingThe maximum possible contrast. |
| #777777 on #FFFFFF | 4.47:1 · fails AA for normal textPasses for large text (3:1). |
| #767676 on #FFFFFF | 4.54:1 · passes AAThe lightest gray that passes AA on white. |
| #FFFFFF on #0EA5E9 | 2.77:1 · fails AAWhite text on a light blue button is too faint. |
| #595959 on #FFFFFF | 7.00:1 · passes AAA |
Frequently asked questions
What contrast ratio does WCAG require?
How is the contrast ratio calculated?
Why does 4.47:1 fail when it is so close to 4.5?
How does the color suggestion work?
Related tools
Color Converter
Convert between HEX, RGB, and HSL color formats. Color picker with palette generator.
CSS Tools
CSS/SCSS minifier, px-to-rem converter, flexbox and grid generator. All-in-one CSS toolkit.
Open Graph Preview
Preview and generate Open Graph and Twitter Card meta tags. See how your links appear on social media.
Unit Converter
Convert between units of length, weight, temperature, speed, and more. Free online unit converter.