Type a tool name, for example "keyword density" or "transcript".
Check WCAG 2.1 AA & AAA color contrast ratios for text and UI components.
Transparency is composited over the background, with a white page underneath. Ratios apply to these resulting colors.
Contrast Ratio
21:1
| Criterion | Required Ratio | Result |
|---|---|---|
| Normal Text (AA) | ≥ 4.5:1 | |
| Large Text (AA) | ≥ 3:1 | |
| Normal Text (AAA) | ≥ 7:1 | |
| Large Text (AAA) | ≥ 4.5:1 | |
| UI Components (AA) | ≥ 3:1 |
Live Preview
Normal text: The quick brown fox jumps over the lazy dog.
Large text: Heading Example
Large text is defined as 18pt (24px) or larger, or 14pt (18.67px) bold or larger per WCAG 2.1.
A color contrast checker compares a text color with its background and tells you whether the pair meets WCAG 2.1 AA and AAA. Enter two colors as HEX or RGB, press Check Contrast, and you get the ratio, pass or fail results for normal text, large text and UI components, and a live preview of the pair.
Color contrast ratio is a number from 1:1 to 21:1 that describes how different two colors are in brightness. The higher the number, the easier it is to read one color on top of the other. Black on white scores the maximum 21:1, and two identical colors score 1:1.
The Web Content Accessibility Guidelines (WCAG) define the calculation. Each color is converted to a relative luminance value between 0 (black) and 1 (white). The ratio is then (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color and L2 is the darker one. The result is shown in the form 4.5:1.
This is different from the "color contrast" you may know from art or photography, where it can mean opposing hues on a color wheel. WCAG contrast is about legibility: whether people with low vision, color vision deficiencies or a glare-filled screen can actually read your text and see your controls.
You only need two colors and one click. The tool starts with black text on a white background, so you will see a 21:1 result before you change anything.
If a color cannot be read, you will see a message such as "Invalid foreground color. Use HEX (#RRGGBB) or RGB." Fix the value and run the check again.
Gray body text is the most common contrast failure on the web, so it makes a good test. Suppose your design uses #767676 text on a #ffffff background.
The checker returns a ratio of about 4.54:1. That passes Normal Text (AA) because 4.54 is above 4.5. It also passes Large Text (AA), Large Text (AAA) and UI Components (AA). It fails Normal Text (AAA), which needs 7:1.
Now lighten the gray to #999999. The ratio drops to about 2.85:1, and every row in the table fails. The fix is to darken the text until the Normal Text (AA) row turns to Pass. In this case, going back to #767676 or darker is enough for AA, and something near #595959 gets you close to AAA.
Say your text is rgba(0, 0, 0, 0.5) on white. The tool blends the semi-transparent color over the background, which gives a mid-gray. The ratio is roughly 4:1, so it passes for large text but fails for normal text at AA. Transparent text is easy to misjudge by eye, so this is where a numeric check helps most.
Each row in the results table answers a single question: does this color pair meet that WCAG requirement? The thresholds are fixed by WCAG 2.1, and the tool applies them to the ratio it calculates.
| Criterion | Required ratio | Applies to |
|---|---|---|
| Normal Text (AA) | 4.5:1 | Body copy, labels, captions |
| Large Text (AA) | 3:1 | Headings, big buttons |
| Normal Text (AAA) | 7:1 | Enhanced readability |
| Large Text (AAA) | 4.5:1 | Enhanced, large text |
| UI Components (AA) | 3:1 | Borders, icons, focus rings |
WCAG treats text as large when it is at least 18pt (24px), or at least 14pt (about 18.67px) and bold. The Live Preview shows normal text at 16px and large text at 24px, so you can see how each size looks in your colors. Anything smaller than the large threshold must meet the normal text ratios.
Change one color at a time and recheck. Darken the text, or lighten the background, until the row you care about turns to Pass. Keep the hue if brand color matters: a darker shade of the same blue usually fixes the ratio without changing the look much. If a brand color simply cannot reach 4.5:1, use it for large headings or decoration and use a darker shade for small text.
This checker works with color values, so it fits any workflow where you can copy a HEX or RGB code. You do not need to upload a file or install anything.
Once your pair passes, you can build the rest of the scheme with the color palette generator and test each text and background combination you plan to use.
Anyone who chooses colors for people to read should test them. These are the most common situations:
Good contrast also helps everyone else. Sunlight on a phone, a dim projector or a cheap monitor all reduce effective contrast, and pages with strong contrast stay readable in those conditions. That tends to help engagement and keeps people on the page.
Most contrast mistakes come from testing only the main text color, or from entering a color the tool cannot read. These habits prevent both.
Small differences usually come from rounding, from how transparency is handled, or from a color that was typed slightly differently. This checker blends transparent colors over the background, and blends the background over white, before it calculates the ratio. If you compare numbers, make sure you are comparing the same final colors.
A passing ratio is necessary for readable text, but it does not guarantee a fully accessible design. The tool judges the two colors you enter and nothing else.
Shadows and borders can add separation between elements, but they do not replace a proper text ratio. If you use them on buttons or cards, design them with the CSS box shadow generator and then test the text colors inside.
Enter your foreground and background colors above, press Check Contrast, and fix any row marked Fail before the design ships. It takes a few seconds per pair and removes guesswork from your accessibility review. For more utilities for building and testing pages, browse the web developer tools collection.
Your report has been submitted. We will look into this issue.
A VPN changes your network exit. It does not guarantee anonymity.
Themes, plugins, code, video, audio, graphics & more from 90,000+ authors.
Web Development
Design & Media
Unlimited Access
Explore Envato MarketWCAG contrast is calculated from sRGB relative luminance. Transparent backgrounds are composited over white; text is composited over that background. Black on white is 21:1. Large-text and normal-text thresholds differ.
Implementation reviewed: 4 October 2026. Source documentation