Color Contrast (WCAG)

Calculate Color Contrast (WCAG) instantly with the exact formula and a worked example.

Color Contrast (WCAG)

Text: R
Text: G
Text: B
Background: R
Background: G
Background: B
Contrast ratio
4.5422
Calculate Color Contrast (WCAG) instantly with the exact formula and a worked example.
AA, normal text (4.5:1)
Pass
AA, large text (3:1)
Pass
AAA, normal text (7:1)
Fail
AAA, large text (4.5:1)
Pass
Text / background
#767676 / #FFFFFF

More about: Color Contrast (WCAG)

What it calculates

The “Color Contrast (WCAG)” calculator computes Contrast ratio from 6 parameters: text: r, text: g, text: b, background: r, background: g, background: b.

A converter between units of measure, currencies, and sizes.

Example calculation

With parameters Text: R = 118, Text: G = 118, Text: B = 118, Background: R = 255, Background: G = 255, Background: B = 255 the result is 4.54.

How to use

  1. Enter text: r, text: g, text: b, background: r, background: g and background: b — each field above is adjustable with a slider.
  2. Contrast ratio is calculated automatically as you type.
  3. Check the worked example below to see the formula applied to real numbers.
  4. Copy the result or bookmark this calculator.

Related calculators

FAQ

How is Color Contrast (WCAG) calculated?
The Color Contrast (WCAG) calculator computes Contrast ratio from text: r, text: g, text: b, background: r, background: g, background: b. Enter your values above and the exact formula is applied instantly; a worked example with real numbers is shown below.
Is the Color Contrast (WCAG) calculator free?
Yes. It is completely free, needs no signup, runs entirely in your browser, and sends no data to any server.

More calculators in this category

Explore related free tools

Cutu to DaysRing SizeHat SizeSki or Board Size by HeightTie LengthWedding Dress SizeInches ↔ cmFeet ↔ MetersYards ↔ MetersMiles ↔ kmNautical MilesLight Year ↔ km