Formula to determine brightness of RGB color

前端 未结 20 3091
猫巷女王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:44

    Please define brightness. If you're looking for how close to white the color is you can use Euclidean Distance from (255, 255, 255)

提交回复
热议问题