Pick a text color and a background color to see the contrast ratio and the WCAG criteria at once. It runs in your browser and nothing is sent to a server.
Type HEX (#3b82f6), rgb(), hsl() or a color name (blue). Click any swatch below to select that color.
Choose an image or drag and drop it here, or paste it with Ctrl+V.
Click or tap the image to select the color at that point. With the keyboard, move the pointer with the arrow keys and press Enter. The image stays in your browser and is never uploaded.
Large text Aa
Normal-size sample text. See here whether the contrast is enough.
| Criterion | Required | Result |
|---|
The semi-transparent color was blended over the background for the calculation.
Light grey text can look stylish on white, but it becomes unreadable on a phone in sunlight, at low screen brightness or for someone with low vision. A large share of people live with some form of visual impairment or color blindness, and contrast sensitivity drops with age. Enough contrast makes a site readable for everyone.
It is not just good practice but a legal requirement in many places: the European Accessibility Act in the EU and ADA cases in the US expect websites to meet WCAG criteria.
WCAG 2 level AA asks for at least 4.5:1 contrast for normal text and 3:1 for large text (about 24 pixels, or 18.7 pixels bold). Level AAA is stricter: 7:1 for normal text and 4.5:1 for large text. Non-text interface parts such as button borders, form fields and icons need 3:1.
The ratio runs from 1:1 (the same color) to 21:1 (white on black). On a white background, grey #767676 is about 4.5:1, right at the AA limit; any lighter grey is too weak for normal text.
If the ratio is too low, darkening the text or lightening the background usually does it; to keep the hue, change only the lightness in HSL. If your brand color itself is too weak for text, use it for large headings, button backgrounds or decoration instead. If the text color is semi-transparent, the tool blends it over the background and checks the color you actually see. All calculations run in your browser.
The relative luminance of each color is calculated, then the ratio (luminance of the lighter color + 0.05) / (luminance of the darker color + 0.05) is found. The ratio ranges from 1:1 (same color) to 21:1 (black on white).
For WCAG 2 AA, normal text needs at least 4.5:1 and large text at least 3:1. For AAA, normal text needs 7:1 and large text 4.5:1. For non-text UI components (button borders, icons) at least 3:1 is recommended.
In WCAG, text of at least 18 point (about 24 pixels), or at least 14 point (about 18.7 pixels) when bold, counts as large.
If the text color is semi-transparent it is blended over the chosen background and the ratio is calculated for the resulting opaque color.