24 ways to impress your friends

Jump to menu

Vote down?

Michael Kaply


What is your opinion of using luminance for this computation?

let luminance = 0.2126 * r + 0.7152 * g + 0.0722 * b;

if luminance < 110 light, else dark (might be backwards)

This is how Firefox determines whether a given textcolor in a Persona should have a light or dark text shadow.