Formula to determine brightness of RGB color

前端 未结 20 3000
猫巷女王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-22 00:00

    I wonder how those rgb coefficients were determined. I did an experiment myself and I ended up with the following:

    Y = 0.267 R + 0.642 G + 0.091 B
    

    Close but but obviously different than the long established ITU coefficients. I wonder if those coefficients could be different for each and every observer, because we all may have a different amount of cones and rods on the retina in our eyes, and especially the ratio between the different types of cones may differ.

    For reference:

    ITU BT.709:

    Y = 0.2126 R + 0.7152 G + 0.0722 B
    

    ITU BT.601:

    Y = 0.299 R + 0.587 G + 0.114 B
    

    I did the test by quickly moving a small gray bar on a bright red, bright green and bright blue background, and adjusting the gray until it blended in just as much as possible. I also repeated that test with other shades. I repeated the test on different displays, even one with a fixed gamma factor of 3.0, but it all looks the same to me. More over, the ITU coefficients literally are wrong for my eyes.

    And yes, I presumably have a normal color vision.

提交回复
热议问题