Color contrast checker for accessible, readable text.
Check text and background colors against WCAG 2.2 AA and AAA, preview them live, and get the nearest colors that pass.
Passes AA for all text sizes.
Contrast ratio 5.32:1. Passes AA Normal text, AA Large text, AAA Large text, AA UI components & graphics. Fails AAA Normal text.
- Pass
AA · Normal text
Needs 4.5:1 · SC 1.4.3
- Pass
AA · Large text
Needs 3:1 · SC 1.4.3
- Fail
AAA · Normal text
Needs 7:1 · SC 1.4.6
- Pass
AAA · Large text
Needs 4.5:1 · SC 1.4.6
- Pass
AA · UI components & graphics
Needs 3:1 · SC 1.4.11
Preview
#6b6b6b on #ffffffLarge text, 24px regular
Large text, 18.66px bold
Normal text at 16px. Body copy, labels and links need at least 4.5:1 to meet AA.
The preview shows large and normal sample text, a filled button, an outlined button, a search field border and an icon in the text color on the background color.
Suggested text colors
Same hue, new lightnessAA (4.5:1 for normal text): your text color already passes.
#595959
Passes AAA · 7:1
Free and private: this tool runs entirely in your browser.Need a design that converts? Talk to TechnoHelp
How to use the contrast checker
Enter your two colors
Type or paste the text and background colors as HEX, RGB, HSL, OKLCH or a CSS color name, or pick them with the color picker. Use the swap button to flip them.
Read the contrast ratio
The ratio runs from 1:1 (no contrast) to 21:1 (black on white). Each WCAG level is marked Pass or Fail, for normal text, large text and UI components.
Check the preview
See your colors on real sample text at 16px, 24px and 18.66px bold, and on a button, a field border and an icon.
Apply a passing color
If AA or AAA fails, the tool suggests the closest text color that passes by changing only its lightness, so the hue stays recognizable. Click Apply to use it, or copy the HEX value.
WCAG contrast requirements.
WCAG 2.2 sets minimum contrast ratios for text and for the parts of an interface people need to see to use it.
| Level | Applies to | Minimum | Success criterion |
|---|---|---|---|
| AA | Normal text | 4.5:1 | 1.4.3 Contrast (Minimum) |
| AA | Large text | 3:1 | 1.4.3 Contrast (Minimum) |
| AA | UI components and graphical objects | 3:1 | 1.4.11 Non-text Contrast |
| AAA | Normal text | 7:1 | 1.4.6 Contrast (Enhanced) |
| AAA | Large text | 4.5:1 | 1.4.6 Contrast (Enhanced) |
- Large text
- At least 18 point (typically 24px) regular, or 14 point (about 18.66px) bold.
- No rounding
- The thresholds are exact. A ratio of 4.499:1 does not meet 4.5:1, so this tool shows ratios truncated, never rounded up.
- Exceptions
- Text in logos, purely decorative text, and text in inactive (disabled) controls have no contrast requirement.
How the contrast ratio is calculated.
Linearize each channel
Divide each sRGB channel by 255, then undo the sRGB gamma curve so the values are proportional to light.
Weight the channels
Relative luminance L = 0.2126 R + 0.7152 G + 0.0722 B. Green counts most because our eyes are most sensitive to it.
Compare the two colors
Contrast ratio = (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color. The result runs from 1:1 to 21:1.
The formula only looks at luminance, so hue alone does not create contrast: two very different hues with similar luminance can score close to 1:1. See the WCAG 2.2 definitions of relative luminance and contrast ratio.
The ratio needs two solid colors. When a color is transparent, this tool blends the text over the background and the background over white before measuring. For text on images or gradients, check the lightest and darkest areas behind the text.
Frequently asked questions.
What is a good color contrast ratio?
To meet WCAG 2.2 Level AA, normal text needs at least 4.5:1 and large text at least 3:1 against its background. Level AAA raises this to 7:1 for normal text and 4.5:1 for large text. Icons, form field borders and other UI components need at least 3:1.
What counts as large text in WCAG?
Large text is at least 18 point regular or 14 point bold. On the web that is typically 24px regular, or about 18.66px bold. Smaller text must meet the normal text ratios.
Does a contrast ratio of 4.49:1 pass WCAG AA?
No. WCAG thresholds are exact and ratios should not be rounded, so anything below 4.5:1, including 4.499:1, fails AA for normal text. This checker compares the unrounded ratio and truncates the number it displays.
What contrast do buttons, icons and form fields need?
WCAG 2.2 success criterion 1.4.11 (Non-text Contrast) requires at least 3:1 for the visual parts needed to identify UI components and their states, such as a field border or a focus indicator, and for graphics needed to understand content, such as icons and chart lines. Text inside a button still needs 4.5:1, or 3:1 if it is large.
Do disabled buttons and logos need to meet contrast requirements?
No. WCAG exempts text in inactive user interface components, text that is purely decorative, and text that is part of a logo or brand name. Good contrast still helps people read them.
How do I check contrast for transparent colors or text on images?
Contrast is measured between two solid colors. This tool blends a semi-transparent text color over the background, and a semi-transparent background over white, then measures the result. For text over a photo or gradient, test the text color against the lightest and darkest parts of the area behind it.
Do I need to meet AAA contrast?
Most accessibility policies and laws refer to WCAG Level AA. The W3C does not recommend requiring Level AAA for entire sites, because some content cannot meet every AAA criterion. Meeting AAA contrast where you can makes text easier to read for more people.
What about APCA and WCAG 3?
WCAG 3 is a W3C Working Draft, not a finished standard, and its contrast method is not final. APCA (Accessible Perceptual Contrast Algorithm) has been explored as a candidate for it. WCAG 2.2 is the current W3C Recommendation, and its contrast ratios are what this tool tests.
From the team behind these tools
Accessible color should be designed in, not patched on.
TechnoHelp is an independent web design and development studio. Our UI/UX designers build interfaces and color systems that meet WCAG contrast from the first mockup.