Pick a text color and a background color to see the WCAG contrast ratio. You can type a hex code or use the color picker.
Large text sample
This is how regular body text looks with your colors. Check that it stays easy to read on small screens and in bright light.
Button or borderGood design is not only about how colors look. It is also about whether people can read them. This free color contrast checker compares a text color and a background color, then shows the contrast ratio and whether it passes the WCAG accessibility guidelines.
Enter two hex codes, or pick the colors with the color picker. The result updates as you type.
Our Popular Tools
How to Use the Color Contrast Checker
- Choose your text color. Type a hex code like
#1A3A6B, or tap the color box to pick one. Short codes like#FFFalso work. - Choose your background color. Do the same in the second field.
- Read the ratio. The large number shows the contrast ratio, such as 7.12:1. A short rating sits underneath it.
- Check the pass or fail list. Five checks show which WCAG levels your colors meet.
- Look at the live preview. The sample shows large text, body text and a bordered button in your colors, so you can judge the result with your own eyes.
What the Four Buttons Do
- Swap colors switches the text and background colors. This is handy for testing a light-on-dark version of a design.
- Fix contrast changes the text color as little as possible so it reaches the next WCAG level. If your colors fail AA, it aims for AA. If they already pass AA, it aims for AAA.
- Copy result copies a one-line summary of your colors, the ratio and each pass or fail result. You can paste it into a bug report, a design file or a message to a client.
- Reset brings back the default colors.
What Is Color Contrast?
Color contrast is the difference in brightness between two colors, usually text and the background behind it. The higher the contrast, the easier the text is to read.
The ratio runs from 1:1 (two identical colors) to 21:1 (black on white). It is based on the relative luminance of each color, which is a measure of how bright the color appears to the human eye. The formula is:
(lighter luminance + 0.05) ÷ (darker luminance + 0.05)
You do not need to do this math yourself. The tool does it for you.
What the WCAG Results Mean
WCAG stands for Web Content Accessibility Guidelines. It is the standard most accessibility laws and policies refer to. It sets minimum contrast ratios at two levels: AA and AAA.
| Check | Minimum ratio |
|---|---|
| Normal text, AA | 4.5:1 |
| Normal text, AAA | 7:1 |
| Large text, AA | 3:1 |
| Large text, AAA | 4.5:1 |
| Icons and borders, AA | 3:1 |
What Counts as Large Text?
WCAG treats text as large if it is at least 18 point (about 24 px), or at least 14 point (about 18.7 px) and bold. Large text is easier to read, so it needs less contrast.
Which Level Should You Aim For?
AA is the standard target for most websites and is what most laws and policies ask for. AAA is stricter. It is not always possible for every part of a design, but it is worth using for long articles and important content.
Icons and Borders
The last check covers parts of an interface that are not text, such as icons, form field borders and the outline of a button. These need at least 3:1 against the color next to them.
Real Examples
Small changes in a color can decide whether it passes.
- Black (#000000) on white (#FFFFFF) gives 21:1, the maximum. It passes every check.
- Gray #777777 on white gives about 4.48:1. This is just under the AA limit for normal text, so it fails.
- Gray #767676 on white gives about 4.54:1. This one barely passes AA. The two grays look almost identical, which shows why you should measure rather than guess.
- Light gray #CCCCCC on white gives about 1.6:1. It fails every check. This is a common choice for placeholder text and captions, and it is hard for many people to read.
- Pure red (#FF0000) on white gives about 4:1. It passes for large text and icons, but it fails for normal body text.
Why Color Contrast Matters
- Accessibility. Low contrast makes text hard to read for people with low vision or some types of color vision deficiency. Age and tired eyes make it harder too.
- Everyday readability. Even people with perfect vision struggle with faint text on a phone in bright sunlight.
- Legal and policy requirements. Many organizations and public bodies require websites to meet WCAG AA. Checking your colors is an easy first step.
- Better user experience. Clear text and buttons are easier to scan and use.
Who Can Use This Tool?
- Web designers and developers can test a color palette before building it.
- WordPress site owners can check their theme colors, buttons and links.
- Graphic and UI designers can check mockups, slides and social media graphics.
- Content writers and marketers can check banners, email templates and landing pages.
- Accessibility reviewers can quickly test a pair of colors and copy the result into a report.
Tips for Better Contrast
- Test the real pair. Check the exact text color against the exact background color it sits on, not just your main palette colors.
- Check hover and disabled states. Buttons and links often change color, and the new color needs to pass too.
- Do not rely on color alone. If color is the only thing that shows an error or a link, add an underline, icon or label as well.
- Use Fix contrast as a starting point. It keeps the same hue and only adjusts how light or dark the color is, so it stays close to your original. Check the preview to make sure you still like how it looks.
- Give small text a safety margin. Thin fonts and small sizes are harder to read than the ratio alone suggests, so aim above the minimum when you can.
Limitations to Know About
This tool checks one text color against one solid background color. It does not read colors from images, gradients or semi-transparent layers, and it does not simulate color blindness. If your text sits on a photo or gradient, test the lightest and darkest areas behind the text separately.
WCAG also exempts some items, such as logos and inactive (disabled) controls. A fail in the tool does not always mean a requirement is broken, so use the result along with your own judgment. The ratio is a measurement, not a full accessibility audit.
Frequently Asked Questions
What is a good contrast ratio?
For normal text, 4.5:1 is the minimum for WCAG AA and 7:1 is the minimum for AAA. For large text, the minimums are 3:1 for AA and 4.5:1 for AAA.
Is 4.5:1 required for every piece of text?
It applies to most text on a page. Large text only needs 3:1 for AA. Logos and disabled controls are exempt.
Can I enter a short hex code like #FFF?
Yes. The tool reads three-digit codes such as #FFF and treats them as #FFFFFF. The # symbol is optional.
Why does the ratio round down?
A ratio of 4.499:1 fails AA. If it were rounded up to 4.50, it would look like a pass when it is not. Rounding down keeps the result honest.
What does “Fix contrast” actually change?
It only changes the text color. The background stays the same. The tool keeps the hue and saturation of your text color and moves its lightness up or down to the nearest value that reaches the target ratio. If no color can reach the target on that background, it tells you so, and you will need to change the background.
Does this tool work on mobile?
Yes. The layout adjusts to small screens, and the color pickers work on phones and tablets.
Is a high contrast ratio always better?
Not always. A high ratio is great for readability, but very harsh pairs, such as pure white on pure black, can feel tiring over long text for some readers. Good design balances strong contrast with comfort.
Does passing this check make my site fully accessible?
No. Color contrast is one part of accessibility. A fully accessible site also needs clear structure, keyboard support, alt text, readable fonts and more.
More Tools
- CSS Code Color Extractor
- HSL to HEX
- HEX to CMYK Converter
- Browse Gradients
- Browse Colors
- Color Tint & Shades Generator
- Compare Colors
- Color Harmony Generator
- Color Temperature Converter
- WCAG Color Contrast Checker
- Color Converter
- Gradient Palette Generator
- Gradient Color Palettes
- Color Wheel
- Mesh Gradient Generator
- CMYK to HEX Converter
- HEX to Pantone Converter
- Pantone to HEX Converter
- Pantone Color Finder