Enter a valid color, like #1F2937.
Enter a valid color, like #FFFFFF.
Type a HEX code (#fff or #1f2937), an RGB value (rgb(31, 41, 55)) or a color name (navy), or use the color picker.
Large text sample
Normal text sample. The quick brown fox jumps over the lazy dog.
UI component
Contrast ratio
0.00:1
Suggested text colors
WCAG 2.x requires 4.5:1 for normal text and 3:1 for large text (24px, or 18.66px bold) and UI components. AAA requires 7:1 and 4.5:1. Transparency (alpha) is ignored.
Our Popular Tools
Check Your Color Contrast in Seconds
Low contrast is one of the most common accessibility problems on the web. It is also one of the easiest to fix.
This free WCAG Color Contrast Checker tells you if your text is readable against its background. Pick two colors. Get a contrast ratio and a clear pass or fail result.
No sign-up. No guesswork.
How to Use the Tool
- Enter your text color. Type a HEX code like
#1f2937, an RGB value likergb(31, 41, 55), or a color name likenavy. You can also use the color picker. - Enter your background color. Use the same options.
- Read the result. The contrast ratio and five pass/fail checks update right away.
Four buttons save you time:
- Swap colors flips text and background. Handy for testing dark mode.
- Random pair loads a random combination to explore.
- Reset returns to the defaults.
- Copy result copies the outcome so you can paste it into a design doc, ticket, or email.
A live preview shows large text, normal text, and a button in your chosen colors. You see how the pair looks, not just a number.
What Does the Tool Check?
The tool tests your colors against five WCAG 2.x requirements:
| Check | Minimum ratio |
|---|---|
| Normal text, AA | 4.5:1 |
| Large text, AA | 3:1 |
| Normal text, AAA | 7:1 |
| Large text, AAA | 4.5:1 |
| UI components and graphics, AA | 3:1 |
What counts as “large text”?
WCAG defines large text as 24px or bigger, or 18.66px or bigger if bold. Large text is easier to read, so it gets a lower bar.
What are UI components and graphics?
These are things like button borders, form field outlines, icons, and chart lines. If someone needs to see them to use your page, they need at least 3:1 against the colors next to them.
A Real Example
Take light green text, #C4E3C9, on a near-black background, #111815.
The ratio is 13.02:1. That passes every check, including AAA. Text this readable works well for people with low vision, and for anyone reading on a dim screen or in bright sun.
What Is a Contrast Ratio?
A contrast ratio compares the brightness of two colors. It runs from 1:1 (identical colors, nothing visible) to 21:1 (pure black on pure white).
WCAG calculates it from the relative luminance of each color:
(lighter luminance + 0.05) รท (darker luminance + 0.05)
You don’t need to do this math. The tool does it for you. But it helps to know that the result is a measured value, not a matter of taste.
AA vs. AAA: Which Level Should You Aim For?
AA is the standard target. Most accessibility laws and policies point to WCAG 2.x Level AA. If you only aim for one level, make it this one.
AAA is stricter. It is a good goal for body text, long articles, and any audience likely to include older readers or people with low vision. WCAG itself notes that full AAA conformance isn’t always possible for every piece of content. Even so, aiming for 7:1 on your main text costs little and helps a lot.
Why Color Contrast Matters
Good contrast is not only for people with a diagnosed visual impairment. It helps:
- People with low vision or color vision deficiency
- Older users, whose eyes need more contrast
- Anyone on a small phone screen outdoors
- Anyone with a dim or low-quality display
- Everyone who is simply tired
It also protects your business. Accessibility rules such as the ADA in the US and the European Accessibility Act in the EU lean on WCAG. Poor contrast is among the most frequently flagged failures in accessibility audits.
Common Contrast Mistakes to Avoid
Light gray text on white
This is the classic trap. #777777 on white looks fine to many designers. Its ratio is about 4.48:1, which narrowly fails AA for normal text. #767676 passes at about 4.54:1. One digit makes the difference.
Placeholder text in forms
Placeholders are often styled very light. They still need enough contrast if users rely on them to understand a field.
Text over images or gradients
Contrast changes across the background. Test the worst spot, not the best one. A dark overlay behind the text often fixes it.
Forgetting hover, focus, and active states
A button can pass in its default state and fail when hovered. Test every state.
Checking only the text
Input borders, icons, and chart lines matter too. Use the UI components check for these.
Tips for Better Contrast
- Start with a dark enough text color. It is easier to lighten later than to rescue weak text.
- Don’t rely on color alone. Pair color with underlines, icons, or labels so meaning survives for color-blind users.
- Test both themes. A palette that passes in light mode can fail in dark mode.
- Adjust small steps. Often a slightly darker or lighter shade is enough to pass.
- Document your palette. Record approved text and background pairs so your whole team uses them.
What This Tool Does Not Cover
Being clear about limits builds trust, so here they are:
- Transparency (alpha) is ignored. If your color is semi-transparent, test the final blended color instead.
- It follows WCAG 2.x. This is the version most laws and audits use. Newer contrast models are still in development and are not what compliance is measured against today.
- A pass is not a full audit. Contrast is one part of accessibility. You should also check keyboard use, screen reader support, and text sizing.
- Some content is exempt. WCAG excludes logos, decorative text, and inactive (disabled) controls from contrast requirements.
Frequently Asked Questions
What is the minimum contrast ratio for WCAG AA?
4.5:1 for normal text, 3:1 for large text, and 3:1 for UI components and graphics.
What is the minimum contrast ratio for WCAG AAA?
7:1 for normal text and 4.5:1 for large text.
Does a ratio of 4.49:1 pass?
No. WCAG does not round up. A ratio just under the threshold fails, so always check the exact result.
Is black on white the best choice?
It has the highest possible ratio, 21:1. Some readers find pure black on pure white harsh for long reading. Slightly softer pairs, like dark gray on off-white, can be more comfortable while still scoring well.
Does the tool work for dark mode?
Yes. Enter your light text and dark background, or use Swap colors to flip an existing pair.
Can I enter a color name instead of a code?
Yes. The tool accepts HEX codes, RGB values, and standard color names.
Do logos need to meet contrast requirements?
No. WCAG exempts logos and brand names from the contrast requirement.
Is this tool free?
Yes. Use it as often as you like.
Test Your Colors Now
Pick your colors. Check the ratio. Fix anything that fails before your users ever notice.
Better contrast makes your content easier to read for everyone, and it takes only a few seconds to check.
More Tools
- Color Blindness Simulator
- 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
- 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