My Tool Studio
WCAG

Color Contrast Checker

Gray text on a gray card looks fine on a calibrated monitor and vanishes on a cheap laptop in sunlight. This color contrast checker measures the exact ratio between any text and background pair so you're not guessing. Enter both colors as hex or rgb(), and the wcag contrast checker grades them live against AA and AAA thresholds for normal text, large text, and UI components. When a pair fails, it computes the nearest shade of your own color that passes, so the fix still looks like your brand. Designers run it on mockups, developers run it on design tokens, and auditors use it as a text contrast accessibility checker before sign-off. Everything happens in your browser.

Always freeNo sign upRuns in your browser

Contrast ratio

4.54:1

AA · Normal text

needs 4.5:1

Pass

AA · Large text (18pt+)

needs 3:1

Pass

AA · UI components & graphics

needs 3:1

Pass

AAA · Normal text

needs 7:1

Fail

AAA · Large text

needs 4.5:1

Pass

Large heading text

Normal paragraph text. The quick brown fox jumps over the lazy dog, checking readability at typical body size.

Small print: terms, captions, helper text.

Suggested compliant alternatives (closest to your color)

#535353passes AAA at 7.69:1

Extract colors from an image

How to use

01

Enter your text and background colors

Type hex or rgb() values into the Text color and Background color fields, or use the native pickers. The swap button flips the pair when you want to test inverted styles.

02

Read the five pass or fail badges

The live ratio appears above verdicts for AA normal text, AA large text, AA UI components, AAA normal text, and AAA large text, next to a rendered text preview.

03

Apply a suggested compliant shade

If a pair fails, the tool darkens or lightens your text color step by step until it clears the threshold. Copy the suggested hex or press Use to apply it instantly.

Why Color Contrast Checker

Common questions

What counts as a passing result in this color contrast checker?
Level AA asks for 4.5:1 on normal body text and 3:1 on large text and UI components, while AAA raises text requirements to 7:1. The five badges show every verdict at once, so you never have to memorize the table.
How is the contrast ratio actually calculated?
It uses the WCAG relative luminance formula: (L1 + 0.05) divided by (L2 + 0.05), where L1 is the lighter color's luminance. Results range from 1:1 for identical colors up to 21:1 for pure black on pure white.
Why did my brand color fail the contrast check?
Contrast is driven almost entirely by lightness, not hue, so two vivid colors can still be unreadable together. The suggestion feature keeps your hue and only shifts lightness, which is usually the least painful fix a brand team can accept.
Can I check contrast for colors inside a screenshot?
Yes. Press Upload image and the tool extracts up to eight dominant colors from the file, entirely in your browser. Each swatch has T and B buttons that load it as the text or background color for testing.
Does this work as an aa aaa contrast ratio checker for icons and borders?
It does. WCAG 2.1 criterion 1.4.11 requires 3:1 for UI components and graphical objects, and there's a dedicated badge for that threshold. The preview even renders an outlined button so you can judge the result visually.
Is large text really allowed a lower contrast ratio?
Yes. Text at 18pt and up, or 14pt bold, only needs 3:1 at Level AA because bigger strokes stay legible at lower contrast. The tool reports large text separately so a passing headline never masks a failing paragraph.
What color formats does the contrast checker accept?
Hex codes, rgb() strings, and standard CSS color names all parse. Invalid input gets flagged under the field immediately, so a typo can't silently produce a wrong ratio.
How private are the colors and images I test here?
Fully private. Ratios are computed with JavaScript on your machine, and uploaded images are read on a local canvas that never leaves the page. Nothing is stored or transmitted.

More WCAG tools

View all