AbraCalc

Relative Luminance Calculator

Calculate the WCAG relative luminance of any hex color. Used in contrast ratio calculations for web accessibility.

Embed this tool on your site

How to use this tool

  1. Enter a hex color code.
  2. The tool returns its relative luminance (0–1) per the WCAG 2.1 formula.
  3. Luminance 0 = absolute black; 1 = perfect white.

The WCAG relative luminance measures the brightness of a color on a scale from 0 (black) to 1 (white). It is the basis for computing contrast ratios.

Frequently asked questions

What is relative luminance?
Relative luminance is a linearized measure of brightness that accounts for how the human eye perceives each color channel. Green contributes the most (71.5%), blue the least (7.2%).
How is it used?
Divide the sum of two luminances to get the WCAG contrast ratio: (L1+0.05)/(L2+0.05).

References & sources