Everyday tools ↗

Digital & media maths / FREE BROWSER TOOL

Color contrast.

Calculate WCAG sRGB relative-luminance contrast after explicitly compositing alpha colors.

YOUR EVERYDAY DESKKeep your
next task close.
Switch between tools ↗
Color contrast
See result ↓● Live result
01 / YOUR INPUTS

Processed on this device.

02 / YOUR RESULT

Your answer

ON YOUR DEVICE

Your result will appear here.

Adjust a field to calculate.

LOCAL INPUTS / CLEAR WORKING / USEFUL OUTPUTNothing to sign in to.

Built and maintained by Operance Labs · Report a calculation or documentation issue

A LITTLE KNOW-HOW

How to use
this tool.

  1. Enter the values for your task.
  2. Adjust the settings and inspect the live result and working.
  3. Copy the result or save a local report.

What the inputs mean

Foreground #RRGGBB or #RRGGBBAA
Enter foreground #rrggbb or #rrggbbaa.
Background #RRGGBB or #RRGGBBAA
Enter background #rrggbb or #rrggbbaa.
Opaque canvas behind background
Enter opaque canvas behind background.
A WORKED STARTING POINT

See the working.

Inputs used in this example

These are example values, not a current price, tariff or personal recommendation. Reset example restores them in the workspace.

InputExample value
Foreground #RRGGBB or #RRGGBBAA#FFFFFF
Background #RRGGBB or #RRGGBBAA#3D2637
Opaque canvas behind background#FFFFFF

WCAG contrast ratio

13.71802731 :1

(lighter relative luminance + 0.05) / (darker relative luminance + 0.05)

  • AA normal text ≥4.5: passes; AA large text ≥3: passes; AAA normal text ≥7: passes.
  • Alpha background is composited onto the selected opaque canvas; foreground is then composited onto that background. sRGB channels and WCAG 2.2 luminance are used.
  • Large text means at least 18pt, or 14pt bold. A ratio alone does not establish whole-page accessibility.

Your inputs stay here

Your input is processed on this device. PixelDesk does not upload it to a calculation or file-processing server. Copying and downloading are deliberate actions. Closing the page clears the in-memory inputs; the app remembers only its theme and public reference-rate cache.

Methods and public data ↗

Keep a useful
thing close.

All digital & media maths ↗

Questions, answered.

What can I do with color contrast?

Calculate WCAG sRGB relative-luminance contrast after explicitly compositing alpha colors.

What does the color contrast example show?

With Foreground #RRGGBB or #RRGGBBAA: #FFFFFF; Background #RRGGBB or #RRGGBBAA: #3D2637; Opaque canvas behind background: #FFFFFF, the example returns 13.71802731 :1. The workspace shows the substituted formula and its assumptions; Reset example restores these inputs.

What should I check before using the result?

AA normal text ≥4.5: passes; AA large text ≥3: passes; AAA normal text ≥7: passes. Alpha background is composited onto the selected opaque canvas; foreground is then composited onto that background. sRGB channels and WCAG 2.2 luminance are used.