←
Design

Contrast Checker

Loading the tool…

Ready when you are.Runs in this browser · nothing is uploaded

WCAG AA/AAA color contrast test

  • Free
  • No sign-up
  • No upload
  • Works offline

Tool facts

Price
Free, no sign-up, no watermark
Are files uploaded?
No. Everything is processed in this browser, on your device.
Offline use
Works without a connection once this page has loaded
Browser
A recent Chrome, Edge, Firefox or Safari, on computer or phone.

Check it yourself: press F12, open the Network tab, then use the tool. No request carries your data.

About Contrast Checker

Contrast Checker calculates the WCAG contrast ratio between a text color and a background color and tells you whether the pair passes WCAG 2.2 level AA and AAA. It tests the five common requirements: 4.5:1 for normal text and 3:1 for large text at AA, 7:1 and 4.5:1 at AAA, and 3:1 for user interface components and graphics. A live preview shows large, normal and small text plus a button outline in your colors.

If a pair fails, the tool suggests the nearest color that passes your chosen level. It keeps the hue and chroma of your text color in OKLCH and only changes lightness, so the suggestion still looks like your brand color rather than a random gray. Semi-transparent text is blended over the background before measuring, exactly as it would appear on screen. Colors can be entered as HEX, RGB, HSL, OKLCH, LAB or CSS names, and nothing leaves your browser.

Contrast Checker runs entirely in your browser. Your data is processed on your device and is never uploaded to Qiyi or anyone else.

How to use Contrast Checker

  1. Enter the Text color and Background color as a HEX code or any CSS color, or click the color squares to pick them.
  2. Read the contrast ratio and the pass or fail result for each WCAG criterion in the table.
  3. Check the Preview; click the normal text line to type your own sample.
  4. If the pair fails, choose AA or AAA under Suggestion and click Use this color to apply the nearest passing text color.
  5. Click Swap to test the colors the other way around, for example for a dark theme.

Frequently asked questions

What contrast ratio do I need?

WCAG 2.2 success criterion 1.4.3 (AA) requires 4.5:1 for normal text and 3:1 for large text. Criterion 1.4.6 (AAA) requires 7:1 and 4.5:1. Criterion 1.4.11 requires 3:1 for icons, input borders, focus indicators and other UI components against adjacent colors.

What counts as large text?

Large text is at least 18 point (24 CSS pixels) in regular weight, or at least 14 point (about 18.66 CSS pixels) in bold. Anything smaller must meet the normal text ratio.

How is the contrast ratio calculated?

Each color is converted to relative luminance by linearizing its sRGB channels and weighting them 0.2126 red, 0.7152 green and 0.0722 blue. The ratio is (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color, so it ranges from 1:1 to 21:1 for black on white. Ratios are not rounded up: 4.49:1 fails AA.

How are transparent colors handled?

A text color with alpha is composited over the background first, and the ratio is measured on the resulting color. A transparent background is composited over white, because the color behind it is unknown.

Does passing the contrast check make my design accessible?

Contrast is one requirement among many. Font size, weight, line spacing, focus states, color not being the only signal and real user testing still matter. WCAG 3 may adopt a different contrast model (APCA), but WCAG 2.2 is the current standard referenced by most laws.

· Free · Runs in this browser · nothing is uploaded

Drop any file here
Drop it to see which tools can open it