TIL that "luminance" (aka brightness) for RGB #pixels isn't just a simple average.

Yes, (255, 255, 255) is max white, brightest possible (8-bit) value.

But colors are tricksy.

example:

Bitcoin orange is (255, 153, 0). If we naively calculate its brightness, we'd get: (255+153+0)/3 = 136

But notice that the naive calculation would give us the same brightness for (153, 0, 255):

My eye easily says that the purple is darker overall than the orange.

So instead the calculation is:

Orange: 0.2125*255 + 0.7154*153 + 0.0721*0 = 163.6

Purple: 0.2125*153 + 0.7154*0 + 0.0721*255 = 50.9

Orange is CLEARLY brighter (aka higher luminance)!

#nerd #videophile #graphics

Reply to this note

Please Login to reply.

Discussion

No replies yet.