← Back to context

Comment by ignifero

15 years ago

Sorry if i am being dense but you got me confused. It makes sense to add 2 rgb vectors from a perceptional standpoint: you add a red color on a green color you get a yellow. It also makes sense from a physical standpoint: the resulting frequency spectrum will have peaks near both red and green, thus what we perceive as yellow. If instead you mean that "red" is not a physical quantity, i totally agree, it's just a name for a range of frequencies.

It seems to me in computer graphics you also have to deal with other color problems such as light dispersion, the blue shift due to light scattering in the atmosphere, maybe even doppler effects :), but it's still valid to combine colors linearly for short distances, for example a green and yellow lightbulb would look yellow from a reasonably far distance.

In the example you give below, RGB 128 can be considered halfway between black and white, just not in terms of frequency, but in terms of freq. distribution (also, RGB is a 3dimensional space). As for the earthquakes, you 're right, the amplitude of the resulting wave would be the product of the original waves. Sorry for the rambling, i think it's a fun subject.

What I'm saying is that RGB(128,128,128) is not halfway between RGB(0,0,0) and RGB(255,255,255), in the same way that a 4.0 earthquake is not halfway between a 0.0 earthquake and an 8.0 earthquake.

The scale is non-linear.

As far as I can see, the only true linear space is frequency space --- aka "EM spectrum" space.

  • I believe this is why a gamma transform is made at presentation time. But maybe what you're interested in is adding RGB tuples before presentation?

    • What he is trying to do is produce a simple relation between RGB values and EM frequencies; which is not possible. There is no simple relationship there, RGB values are only related to how we see light, how our eyes work, not to the EM spectrum.

  • I believe what you are looking for is the alpha channel--the fourth color component which specifies how to blend two values. It doesn't make sense to add RGB(0,0,0) and RGB(0.5,0.5,0.5). It does make sense to add RGBA(0,0,0,0) and RGBA(0.5,0.5,0.5,0.5).