Formula to determine brightness of RGB color

前端 未结 20 3095
猫巷女王i
猫巷女王i 2020-11-21 23:16

I\'m looking for some kind of formula or algorithm to determine the brightness of a color given the RGB values. I know it can\'t be as simple as adding the RGB values toget

20条回答
  •  南方客
    南方客 (楼主)
    2020-11-21 23:55

    This link explains everything in depth, including why those multiplier constants exist before the R, G and B values.

    Edit: It has an explanation to one of the answers here too (0.299*R + 0.587*G + 0.114*B)

提交回复
热议问题