Luminance Calculator
Calculate the relative luminance of any color according to WCAG standard
Compare relative luminance between two colors, calculate WCAG contrast ratio and get automatic suggestions to improve accessibility.
Luminance Comparison
Contrast Ratio
Acceptable
Sample Text
Small sample text
WCAG 2.1 Levels
Suggestion to reach AA
Adjust to #1E6FF5
New ratio: 4.52:1
Grayscale Equivalent
The grayscale equivalent shows how the color's brightness is perceived without the hue.
W3C Formula
L = 0.2126 × R + 0.7152 × G + 0.0722 × BContrast = (L1 + 0.05) / (L2 + 0.05)Based on the standard sRGB color space.
How it works
Relative luminance measures the perceived brightness of a color, from 0 (black) to 1 (white).
Why is it important?
Luminance is the basis for calculating WCAG contrast ratio. Two colors with similar luminance will have low contrast.
Formula
L = 0.2126 × R + 0.7152 × G + 0.0722 × BWhere R, G, B are linearized (gamma corrected) values.
💡 Practical Use Cases
Case 1: Choose text color
Your background is #F3F4F6 (light gray). What text color to use?
→ Background luminance: 0.92 (very light)
→ You need text with L < 0.18 for good contrast
Case 2: Compare "bright" colors
Why does yellow seem brighter than pure blue?
→ Yellow #FFFF00: L = 0.93
→ Blue #0000FF: L = 0.07
→ Green in yellow contributes high luminance
Case 3: Debug contrast issues
Two colors look different but have low contrast.
→ Compare their luminances
→ If similar, you need to adjust one of them