Color Contrast Checker

A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call

Free color contrast checker. Test text and background colors against WCAG 2.2 AA and AAA, and get the nearest color that passes.

Large text: fresh bread daily

Normal text: order by 2pm for next-day office delivery across Austin.

Contrast ratio
0

Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.

How to use the color contrast checker

Enter a text colour and a background colour, as HEX codes (#777777), RGB (rgb(119, 119, 119)) or HSL, or pick them with the colour pickers. The color contrast checker shows:

  • The contrast ratio, from 1:1 (no contrast) to 21:1 (black on white).
  • Pass or fail for each WCAG level: AA and AAA, for normal and large text, and the 3:1 level for buttons, icons and form borders.
  • A live preview of large and normal text in your colours.
  • The nearest colour that passes: if your text colour fails, it suggests the closest colour with the same hue that reaches AA (4.5:1) and AAA (7:1).

The ratio is shown to two decimal places and never rounded up, so a pair at 4.48:1 shows as 4.47, not 4.5, and doesn't look like a pass when it isn't. Everything runs in your browser.

What colour contrast is

Contrast is the difference in brightness between text and its background. Low contrast makes text hard to read for everyone, and for many people impossible: those with low vision, colour vision deficiencies or age-related changes in sight, and anyone reading a phone outside in bright sunshine.

The Web Content Accessibility Guidelines (WCAG) measure contrast as a ratio of relative luminance, the perceived brightness of each colour:

contrast ratio = (L1 + 0.05) ÷ (L2 + 0.05)

where L1 is the luminance of the lighter colour and L2 of the darker one. The color contrast checker uses the exact WCAG formula, converting each colour from sRGB to linear light before weighting red, green and blue by how sensitive our eyes are to each (green most, blue least).

The WCAG contrast levels

Requirement Level Minimum ratio
Normal text (1.4.3) AA 4.5:1
Large text (1.4.3) AA 3:1
Normal text (1.4.6) AAA 7:1
Large text (1.4.6) AAA 4.5:1
Buttons, icons, form borders, chart elements (1.4.11) AA 3:1

Large text means at least 18 point (24 CSS pixels) for regular weight, or 14 point (about 18.7 CSS pixels) for bold.

AA is the level most laws and policies refer to, and the one to aim for as a minimum. AAA is stricter and good for long reading, such as articles and documents. These levels are the same in WCAG 2.1 and 2.2.

What doesn't need to meet contrast rules

WCAG makes exceptions for:

  • logos and brand names in text,
  • disabled buttons and other inactive controls,
  • purely decorative text and images,
  • text that's part of a photo with significant other content.

Placeholder text in forms isn't exempt, which surprises many designers: light grey placeholders often fail.

Why it matters for your business

  • More people can read your site. Roughly one in twelve men and one in two hundred women have some form of colour vision deficiency, and many more people have low vision.
  • Legal requirements. Accessibility laws such as the Americans with Disabilities Act (as applied by US courts), the European Accessibility Act, which applies to many products and services from June 2025, and public-sector rules in many countries refer to WCAG.
  • Better results for everyone. Clear, readable text helps people on phones, in sunlight and on cheap screens. Buttons that stand out get more clicks.

Fixing contrast that fails

When the color contrast checker shows a fail, it suggests the nearest passing colour with the same hue, so your design keeps its character. For example, the popular light grey #777777 on white is 4.47:1, just short of AA; the nearest passing grey is #767676 at 4.54:1. For AAA, it suggests #595959.

Other ways to fix contrast:

  • Darken the text on light backgrounds, or lighten it on dark ones.
  • Change the background instead, if the text colour is a brand colour you need to keep.
  • Make the text larger or bold, which lowers the requirement from 4.5:1 to 3:1.
  • Add a solid background behind text on photos, or a dark overlay.

Brand colours

Bright brand colours often fail as text on white. Tomato red #FF6347 on white is only 2.94:1, which fails even for large text. Options:

  • Use the brand colour for large headings, backgrounds or decoration, and a darker shade for body text and links. The checker suggests #E72300 as the nearest shade that passes AA as text on white.
  • Put white text on a darker version of the colour for buttons.
  • Keep a short list of approved text and background pairs in your brand guidelines.

The HEX to RGB converter gives you every format of a colour code for your style guide.

Contrast for buttons, icons and forms

Since WCAG 2.1, user interface components and meaningful graphics need 3:1 contrast against what's next to them:

  • the border of a text input against the page,
  • an icon-only button such as a search magnifying glass,
  • the focus outline that shows where you are when navigating with a keyboard,
  • lines and bars in charts that carry information.

A button's text needs 4.5:1 against the button's own colour; the button's edge needs 3:1 against the page around it, unless the text alone makes it clear it's a button.

Dark mode

If your site or app has a dark theme, check it separately. Colours that pass on white often fail on near-black, and the reverse. Pure white text on pure black (21:1) passes easily but can feel harsh for long reading; many dark themes use an off-white such as #E6E6E6 on a dark grey such as #121212, which is still well above 7:1. Brand colours usually need a lighter shade for text in dark mode, just as they need a darker one in light mode. Enter each pair in the color contrast checker to be sure.

Don't rely on colour alone

Contrast is about brightness, but there's a related rule: don't use colour as the only way to show information. Red error messages should also have an icon or the word "Error"; links in body text should be underlined or otherwise distinguishable without colour; charts should have labels, not just a coloured key.

Checking contrast in your workflow

  • Design: check your palette once and record which pairs pass. Most design tools have contrast plugins, but a quick check here works anywhere.
  • Emails and social graphics: text on images is the most common failure. Check the text against the lightest part of the image behind it.
  • Your QR codes: phone cameras need contrast too; the QR code generator warns you if your colours are too close.
  • Headings: good contrast pairs well with a clear heading structure; the heading checker checks the outline of a page.

A note on transparency

If either colour is semi-transparent, the colour people actually see depends on what's behind it. The color contrast checker ignores transparency and tells you so; check the final, blended colour instead (most design tools and browser developer tools can show it).

A worked example

A bakery's website uses light grey #777777 for body text on a white background because it looks soft and modern. Customers keep phoning to ask about delivery times that are written right there on the page.

The owner checks the colours in the color contrast checker: 4.47:1, a fail for normal text at AA, though it passes for large text. The suggested #767676 would just pass, but the owner chooses the AAA suggestion, #595959, for the long delivery information and #767676 for small captions. The change is barely noticeable in the design, and the text is now comfortable to read in daylight on a phone.

Need more customers from Google?

This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. DeepRit is a Google Ads agency that does PPC and nothing else: we build the campaigns, block the searches that waste money, write the ads, set up conversion tracking and send you a short report every week. Request a free PPC audit and we will show you, in dollars, what we would fix first.

Frequently asked questions

What contrast ratio do I need?

At least 4.5:1 for normal text and 3:1 for large text to meet WCAG AA. For AAA, 7:1 for normal text and 4.5:1 for large text.

What counts as large text?

At least 18 point (24 CSS pixels) in regular weight, or 14 point (about 18.7 CSS pixels) in bold.

Why does the checker show 4.47 when other tools show 4.5?

WCAG says a ratio must reach the threshold; it shouldn't be rounded up. The color contrast checker shows two decimals without rounding up, so a near miss is clear.

Do logos need to meet contrast requirements?

No. Logos and brand names are exempt, as are disabled controls and purely decorative text.

Can it check colours with transparency?

It reads them but ignores the transparency. Check the final colour people see, after blending with the background.

Is the color contrast checker free?

Yes. It's free with no sign-up, and it works entirely in your browser.

Free PPC audit

See where your ad budget leaks.

We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.

Book a free audit call 30-minute call · Free · The audit is yours to keep