Advancement · School Operations · Text and background, in numbers

Is the text
dark enough
for the page?

Type the red, green and blue values, each from 0 to 255, for the text and for the background. The page works out the contrast ratio the way the Web Content Accessibility Guidelines define it and shows what passes at AA and AAA, and how much darker the text would need to be to pass.

$9.99a month · everything on Caveat

Cancel anytime. How plans and refunds work

Included with Caveat Plus ($9.99 a month or $99.90 a year), Caveat Family (up to 5 people, $14.99 a month) and Caveat Teams (25 people, $199 a month). Anything you bought before stays yours.

The web color contrast checker

The worked example is gray text with red, green and blue values of 138 on a white background. Nothing you type leaves this browser.

Loading the calculator. If nothing appears, turn on JavaScript.

What you get

Advancement · School OperationsIncluded with Caveat Plus

What you finish with
The luminance of each color, the WCAG contrast ratio, pass or fail for normal text and large text at AA and AAA and for graphics, and a table showing how much darker the text must be to pass.
Who it is for
Web designers and developers, teachers who build course pages and school staff who check documents and sites against accessibility guidelines.
Format
Browser calculator for a phone, tablet or computer, by touch or keyboard. Prints a summary; downloads a spreadsheet (.csv); export and import a file.
Access
Included with Caveat Plus ($9.99 a month) and Caveat Teams. It opens once you are signed in, on every device. Anything you bought before stays yours. Everything you type stays in this browser; nothing is sent to Caveat.
Where it lives
The School Operations space in Caveat Advancement.
Support
Questions, a correction or a request: team@caveatacademic.com.

How to use it

  1. Name where the pair is used.
  2. Type the red, green and blue values of the text color.
  3. Type the red, green and blue values of the background.
  4. Read the ratio and what passes.
  5. Try darker text in the box or the table until it passes.

Check the contrast

How the figures are worked out

From color to luminance to a ratio.

The worked example: gray on whiteText0.254gray 138 linearizedBackground1.000white is 1Ratio3.451.05 ÷ 0.304VerdictAA failsnormal textThe worked example: gray on whiteText0.254gray 138 linearizedBackground1.000white is 1Ratio3.451.05 ÷ 0.304VerdictAA failsnormal text
Each color becomes a luminance; the lighter one over the darker gives the ratio.

What the guidelines ask

The Web Content Accessibility Guidelines 2.2 set a minimum contrast of 4.5 to 1 for normal text at level AA, and 3 to 1 for large text, defined as 18 point or 14 point bold. Level AAA raises these to 7 to 1 and 4.5 to 1. User interface components and meaningful graphics need 3 to 1 against adjacent colors.

How the ratio is made

Each color is converted to a relative luminance, a weighted sum of its linearized red, green and blue values that matches how bright the eye finds the color. The ratio adds 0.05 to both luminances so that black on black does not divide by zero.

Sources

  1. W3C. (2023). Web Content Accessibility Guidelines (WCAG) 2.2. Success Criteria 1.4.3 Contrast (Minimum), 1.4.6 Contrast (Enhanced) and 1.4.11 Non-text Contrast (w3.org/TR/WCAG22).
  2. W3C. Understanding Success Criterion 1.4.3: Contrast (Minimum), with the definition of relative luminance (w3.org/WAI).
  3. International Electrotechnical Commission. (1999). IEC 61966-2-1: Colour management, default RGB colour space sRGB: the transfer function the luminance formula uses.
  4. Your organization's accessibility policy, which sets the level it must meet.

A calculation of the ratio the guidelines define, not a full accessibility check. The worked example is made up. Your entries stay in this browser. Support: team@caveatacademic.com.

Written with AI, then checked before it is published. How we checkFound a mistake? Report it and we fix it, or refund you.Cancel anytime.