Relative Luminance Calculator
Calculate the WCAG relative luminance of any hex color. Used in contrast ratio calculations for web accessibility.
How to use this tool
- Enter a hex color code.
- The tool returns its relative luminance (0–1) per the WCAG 2.1 formula.
- 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).