chroma icon indicating copy to clipboard operation
chroma copied to clipboard

Brightness - sqrt(red^2 * 0.299 + green^2 * 0.587 + blue^2 * 0.114)

Open Laykou opened this issue 3 years ago • 0 comments

According to this https://www.atlantbh.com/how_to_detect_colour_brightness_in_ruby/ ​brightness should be calculated as

sqre(red^2 * 0.299 + green^2 * 0.587 +  blue^2 * 0.114)

rather than

red * 0.299 + green * 0.587 +  blue * 0.114

Why does this gem use a different formula?

Laykou avatar May 15 '21 11:05 Laykou