GratisAI

Accessibility · official-source review · reviewed 2026-10-10

Run a Quick Color Contrast Check Between Text and Background

Most small sites fail contrast because designers test by eye instead of running the WCAG formula.

What this guide helps you do

Compute the contrast ratio between two hex colors and flag WCAG AA/AAA pass/fail.

Who this guide is for

Web builders checking text contrast for accessibility.

Use the source document or official route that applies to your situation. This guide does not contact another person or verify external information.

Steps

  1. Sample the colors

    Get the hex codes for your text and background colors.

  2. Compute the ratio

    Use the WCAG relative luminance formula, not your eye.

  3. Check against WCAG

    Normal text needs 4.5:1 for AA, 7:1 for AAA.

  4. Adjust one color

    Lighten or darken one color until normal text passes 4.5:1.

Worked example

Black text (#1a1a1a) on off-white (#f8f8f8) gives a ratio of 14.8:1, passing both AA and AAA for normal text.

Use your own source and details. The example is not a record about a real person or organization.

What the sources say

Understanding Contrast (Minimum)

W3C Web Accessibility Initiative · reviewed 2026-10-10

What this source supports: WCAG 2.2 requires 4.5:1 contrast for normal text (AA) and 7:1 (AAA), with 3:1 for large text.

Source limit: Contrast is one of many accessibility requirements; it does not guarantee legibility on its own.

These sources support the statements above. They do not show that every person needs this guide. They do not show a specific result.

Limits

This App computes the WCAG contrast ratio from hex values you enter. It does not scan your page.

Contrast is one of many accessibility requirements; it does not guarantee legibility on its own.

Use current instructions from the responsible organization. This guide is a planning aid, not an official decision or a substitute for qualified advice.

Common questions

What does the App compute?

Compute WCAG contrast ratio between two hex colors and flag AA/AAA pass/fail.

What does the App not do?

This computes from hex values you enter. It does not scan a page for you.

Where do the numbers come from?

You enter every number yourself. The sources support the method and the limits. They do not produce a result for your specific case. Keep the original documents next to the sheet you build.

Before you start

Free Companion App

The App computes the worked example with your own numbers, in your browser.

APP 1

Color Contrast Quick Check

Compute WCAG contrast ratio between two hex colors and flag AA/AAA pass/fail.

Free · no account · no upload

Open Color Contrast Quick Check

The App runs in this browser. It does not send or save entries. Copy, download, or print only when you choose.

This guide uses short, direct instructions as an ASD-STE100-style writing target. It is not a formal certification.

About this guide

Category
Accessibility
Reading time
About 3 minutes
Last reviewed
Cost
Free to read. No account is required.

Companion App: Color Contrast Quick Check. It runs in this browser and does not upload your entries.

This guide is edited for clarity and checked against the sources it links. It is not a substitute for official instructions or qualified advice. A linked source does not show that every person needs this guide.