Coding & Dev / THE MITEY TOOLKIT

Color Contrast Ratio

Check WCAG color contrast compliance for text accessibility.

WCAG 2.1 accessibility guidelines require minimum contrast ratios between text and background colors. This calculator checks compliance for normal text (4.5:1) and large text (3:1) at AA and AAA levels.

Calculator inputs

SCENARIO INPUTS

Your starting point.

↻ Live

Enter as #RRGGBB or #RGB

⌁ Results update instantly. Inputs stay in your browser.

My plans ↗

CALCULATED SCENARIO

Contrast Ratio

12.63:1

From your inputs. Explore the breakdown below.

Normal Text A A
PASS
Large Text A A
PASS
Aaa
AAA PASS
Method & sources ↓

PUT THE NUMBERS TO WORK

Bring your question.
Keep the context.

Ask about a result, report an issue or tell us what you’re working through. You choose whether to include these calculator figures.

Talk to MITEY ↗

BEHIND THE ANSWER

Formula and method

Contrast = (L1 + 0.05) / (L2 + 0.05) where L = relative luminance

WCAG 2.1 relative luminance formula. Contrast ratio ranges from 1:1 (no contrast) to 21:1 (black on white).

Worked examples

Black text on white

Text Color (hex):
#000000
Background Color (hex):
#FFFFFF

Contrast Ratio: 21.00:1

Common gray text issue

Text Color (hex):
#888888
Background Color (hex):
#FFFFFF

Contrast Ratio: 3.54:1

Assumptions and limits

  • WCAG 2.1 relative luminance calculation
  • sRGB color space

This tool provides an educational estimate. Rules, rates and personal circumstances can change the answer. Review the assumptions before relying on a result. Report a correction.

Common mistakes to avoid

  • Testing only one color combination — check all text/background combinations including hover states.
  • Using a contrast checker only for regular text — UI components (buttons, icons) also have contrast requirements.
  • Assuming "dark mode" automatically passes — dark themes need careful contrast verification.

Frequently asked questions

What WCAG level do I need?

WCAG 2.1 Level AA is the legal standard in most jurisdictions (required by AODA in Ontario, ADA in the US). Level AAA (7:1 ratio for normal text) is aspirational and not required but provides better accessibility.

Related calculators

A LITTLE MORE CLARITY

Useful updates.
Your choice.

Occasional educational updates from Calculating.ca. Choose the subjects that help you. This is separate from an enquiry, with no instant-alert or fixed-schedule promise.

MITEY · hello@mitey.ca
Under 101M — Unit 101, 7710 5 Street SE, Calgary, Alberta

What would be useful?
No welcome email is sent. Address ownership is not automatically verified.
Newsletter privacy and your choices

Updated November 5, 2026. Newsletter signup is optional and separate from using a tool, chatting or sending an enquiry. With the express permission on this form, MITEY stores your email, optional name, selected topics, exact consent/version, public source page, site and subscription status in its owned CRM. Your calculator entries and chat are not attached. Cloudflare operates the intake and storage; Resend sends an internal alert to the team. These service providers may process information outside your province or Canada.

This is a single opt-in request; the form does not verify ownership of the email address or send a welcome or confirmation email. No campaign sender is enabled by this signup. Keep the private unsubscribe link returned after signup: opening it shows a confirmation page, and selecting Unsubscribe withdraws this site subscription. No login or fee is required. You may also contact hello@mitey.ca to withdraw permission, change preferences or ask about access/correction/deletion. A minimal consent/withdrawal history may be retained for secure operation and applicable obligations; there is no invented fixed deletion deadline. Other sites and private books remain separate.