Colors don't have to be a mixture of red, green, and blue because visible light can be any wavelengths in the 390nm-700nm range. Do primary colors really exist in the real world? Or did we select red, green, and blue because those are the colors that human eyes' cones respond to?
Do primary colors really exist in the real world?
There are no primary colors of light, in fact there is no color intrinsic in light at all (or any other wavelength of electromagnetic radiation). There are only colors in the perception of certain wavelengths of EMR by our eye/brain systems.
Or did we select red, green, and blue because those are the colors that human eyes' cones respond to?
We use three-color reproduction systems because the human vision system is trichromatic, but the primary colors we use in our three-color reproduction systems do not match each of the three colors, respectively, to which each of the three types of cones in the human retina are most responsive.
There's no such thing as "color" in nature. Light only has wavelengths. Electromagnetic radiation sources on either end of the visible spectrum also have wavelengths. The only difference between visible light and other forms of electromagnetic radiation, such as radio waves, is that our eyes chemically react to certain wavelengths of electromagnetic radiation and do not react to other wavelengths. Beyond that there is nothing substantially different between "light" and "radio waves" or "X-rays". Nothing.
Our retinas are made up of three different types of cones that are each most responsive to a different wavelength of electromagnetic radiation. In the case of our "red" and "green" cones there is very little difference in the response to most wavelengths of light. But by comparing the difference and which has a higher response, the red or the green cones, our brains can interpolate how far and in which direction towards red or towards blue, the light source is strongest.
Color is a construct of our eye brain system that compares the relative response of the three different types of cones in our retinas and creates a perception of "color" based on the different amounts each set of cones responds to the same light. There are many colors humans perceive that can not be created by a single wavelength of light. "Magenta", for instance, is what our brains create when we are simultaneously exposed to red light on one end of the visible spectrum and blue light on the other end of the visible spectrum.
Color reproduction systems have colors that are chosen to serve as primary colors, but the specific colors vary from one system to the next, and such colors do not necessarily correspond to the peak sensitivities of the three types of cones in the human retina. "Blue" and "Green" are fairly close to the peak response of human S-cones and M-cones, but "Red" is nowhere near the peak response of our L-cones.
The spectral response of color filters on Bayer masked sensors closely mimics the response of the three different types of cones in the human retina. In fact, our eyes have more "overlap" between red and green than most digital cameras do.
The 'response curves' of the three different types of cones in our eyes:
Note: The "red" L-line peaks at 565nm, which is what we call 'yellow-green', rather than at 640nm, which is the color we call "Red."
The IR and UV wavelengths are filtered by elements in the stack in front of the sensor in most digital cameras. Almost all of that light has already been removed before the light reaches the Bayer mask. Generally, those other filters in the stack in front of the sensor are not present and IR and UV light are not removed when sensors are tested for spectral response. Unless those filters are removed from a camera when it is used to take photographs, the response of the pixels under each color filter to, say, 870nm is irrelevant because virtually no 800nm or longer wavelength signal is being allowed to reach the Bayer mask.
- Without the 'overlap' between red, green and blue (or more precisely, without the overlapping way the sensitivity curves of the three different types of cones in our retinas are shaped to light with peak sensitivity centered on 565nm, 540nm, and 445nm) it would not be possible to reproduce colors in the way that we perceive many of them.
- Our eye/brain vision system creates colors out of combinations and mixtures of different wavelengths of light as well as out of single wavelengths of light.
- There is no color that is intrinsic to a particular wavelength of visible light. There is only the color that our eye/brain assigns to a particular wavelength or combination of wavelengths of light.
- Many of the distinct colors we perceive can not be created by a singular wavelength of light.
- On the other hand, the response of human vision to any particular single wavelength of light that results in the perception of a certain color can also be reproduced by combining the proper ratio of other wavelengths of light to produce the same biological response in our retinas.
- The reason we use RGB to reproduce color is not because the colors 'Red', 'Green', and 'Blue' are somehow intrinsic to the nature of light. They aren't. We use RGB because trichromatism¹ is intrinsic to the way our eye/brain systems respond to light.
The Myth of our "Red" cones and the Myth of "Red" filters on our Bayer masks.
Where a lot of folks' understanding of 'RGB' as being intrinsic to the human vision system runs off the rails is in the idea that L-cones are most sensitive to red light somewhere around 640nm. They are not. (Neither are the filters in front of the "red" pixels on most of our Bayer masks. We'll come back to that below.)
Our S-cones ('S' denotes most sensitive to 'short wavelengths', not 'smaller in size') are most sensitive to about 445nm, which is the wavelength of light most of us perceive as a slightly bluer than red version of purple.
Our M-cones ('medium wavelength') are most sensitive to about 540nm, which is the wavelength of light most of us perceive as a slightly blue-tinted green.
Our L-cones ('long wavelength') are most sensitive to about 565nm, which is the wavelength of light most of us perceive as yellow-green with a bit more green than yellow. Our L-cones are nowhere near as sensitive to 640nm "Red" light than they are to 565nm "Yellow-Green" light!
As the simplified first graph above illustrates, there's not that much difference between our M-cones and L-cones. But our brains use that difference to perceive "color."
From comments by another user to a different answer:
Imagine an extraterrestrial alien who has yellow as a primary color. She would find our color prints and screens lacking. She would think we would be partially color blind not seeing the difference between the world she perceives and our color prints and screens.
That's actually a more accurate description of the sensitivities of our cones that are most sensitive to around 565nm than describing the peak sensitivity of L-cones as "red" when 565nm is on the 'green' side of 'yellow'. The color we call "Red" is centered on about 640nm, which is on the other side of "orange" from "yellow."
Why we use three colors in our color reproduction systems
To recap what we've covered up to this point:
There are no primary colors of light.
It is the trichromatic nature of human vision that allows tri-color reproduction systems to more or less accurately mimic the way we see the world with our own eyes. We perceive a large number of colors.
What we call "primary" colors are not the three colors we perceive for the three wavelengths of light to which each type of cone is most sensitive.
Color reproduction systems have colors that are chosen to serve as primary colors, but the specific colors vary from one system to the next, and such colors do not directly correspond to the peak sensitivities of the three types of cones in the human retina.
The three colors, whatever they might be, used by reproduction systems do not match the three wavelengths of light to which each type of cone in the human retina is most sensitive.
If, for example, we wanted to create a camera system that would provide 'color accurate' images for dogs we would need to create a sensor that is masked to mimic the response of the cones in dogs' retinas, rather than one that mimics the cones in human retinas. Due to only two types of cones in dog retinas, they see the "visible spectrum" differently than we do and can differentiate much less between similar wavelengths of light than we can. Our color reproduction system for dogs would only need to be based on two, rather than three, different filters on our sensor masks.
The chart above explains why we think our dog is dumb for running right past that brand new shiny bright red toy we just threw out in the yard: he can barely see the wavelengths of light that we call "red." It looks to a dog like a very dim brown looks to humans. That, combined with the fact dogs don't have the ability to focus at close distances the way humans do - they use their powerful sense of smell for that - leaves him at a distinct disadvantage since he's never smelled the new toy you just pulled out of the packaging it came in.
Back to humans.
The Myth of "only" red, "only" green, and "only" blue
If we could create a sensor so that the "blue" filtered pixels were sensitive to only 445nm light, the "green" filtered pixels were sensitive to only 540nm light, and the "red" filtered pixels were sensitive to only 565nm light it would not produce an image that our eyes would recognize as anything resembling the world as we perceive it. To begin with, almost all of the energy of "white light" would be blocked from ever reaching the sensor, so it would be far less sensitive to light than our current cameras are. Any source of light that didn't emit or reflect light at one of the exact wavelengths listed above would not be measureable at all. So the vast majority of a scene would be very dark or black. It would also be impossible to differentiate between objects that reflect a LOT of light at, say, 490nm and none at 615nm from objects that reflect a LOT of 615nm light but none at 490nm if they both reflected the same amounts of light at 540nm and 565nm. It would be impossible to tell apart many of the distinct colors we perceive.
Even if we created a sensor so that the "blue" filtered pixels were only sensitive to light below about 480nm, the "green" filtered pixels were only sensitive to light between 480nm and 550nm, and the "red" filtered pixels were only sensitive to light above 550nm we would not be able to capture and reproduce an image that resembles what we see with our eyes. Although it would be more efficient than a sensor described above as sensitive to only 445nm, only 540nm, and only 565nm light, it would still be much less sensitive than the overlapping sensitivities provided by a Bayer masked sensor. The overlapping nature of the sensitivities of the cones in the human retina is what gives the brain the ability to perceive color from the differences in the responses of each type of cone to the same light. Without such overlapping sensitivities in a camera's sensor, we wouldn't be able to mimic the brain's response to the signals from our retinas. We would not be able to, for instance, discriminate at all between something reflecting 490nm light from something reflecting 540nm light. In much the same way that a monochromatic camera can not distinguish between any wavelengths of light, but only between intensities of light, we would not be able to discriminate the colors of anything that is emitting or reflecting only wavelengths that all fall within only one of the the three color channels.
Think of how it is when we are seeing under very limited spectrum red lighting. It is impossible to tell the difference between a red shirt and a white one. They both appear the same color to our eyes. Similarly, under limited spectrum red light anything that is blue in color will look very much like it is black because it isn't reflecting any of the red light shining on it and there is no blue light shining on it to be reflected.
The whole idea that red, green, and blue would be measured discreetly by a "perfect" color sensor is based on oft repeated misconceptions about how Bayer masked cameras reproduce color (The green filter only allows green light to pass, the red filter only allows red light to pass, etc.). It is also based on a misconception of what 'color' is.
How Bayer Masked Cameras Reproduce Color
Raw files don't really store any colors per pixel. They only store a single brightness value per pixel.
It is true that with a Bayer mask over each pixel the light is filtered with either a "Red", "Green", or "Blue" filter over each pixel well. But there's no hard cutoff where only green light gets through to a green filtered pixel or only red light gets through to a red filtered pixel. There's a lot of overlap.² A lot of red light and some blue light gets through the green filter. A lot of green light and even a bit of blue light makes it through the red filter, and some red and green light is recorded by the pixels that are filtered with blue. Since a raw file is a set of single luminance values for each pixel on the sensor there is no actual color information to a raw file. Color is derived by comparing adjoining pixels that are filtered for one of three colors with a Bayer mask.
Each photon vibrating at the corresponding frequency for a 'red' wavelength that makes it past the green filter is counted just the same as each photon vibrating at a frequency for a 'green' wavelength that makes it into the same pixel well.³
It is just like putting a red filter in front of the lens when shooting black and white film. It didn't result in a monochromatic red photo. It also doesn't result in a B&W photo where only red objects have any brightness at all. Rather, when photographed in B&W through a red filter, red objects appear a brighter shade of grey than green or blue objects that are the same brightness in the scene as the red object.
The Bayer mask in front of monochromatic pixels doesn't create color either. What it does is change the tonal value (how bright or how dark the luminance value of a particular wavelength of light is recorded) of various wavelengths by differing amounts. When the tonal values (gray intensities) of adjoining pixels filtered with the three different color filters used in the Bayer mask are compared then colors may be interpolated from that information. This is the process we refer to as demosaicing.
What Is 'Color'?
Equating certain wavelengths of light to the "color" humans perceive that specific wavelength is a bit of a false assumption. "Color" is very much a construct of the eye/brain system that perceives it and doesn't really exist at all in the portion of the range of electromagnetic radiation that we call "visible light." While it is the case that light that is only a discrete single wavelength may be perceived by us as a certain color, it is equally true that some of the colors we perceive are not possible to produce by light that contains only a single wavelength.
The only difference between "visible" light and other forms of EMR that our eyes don't see is that our eyes are chemically responsive to certain wavelengths of EMR while not being chemically responsive to other wavelengths. Bayer masked cameras work because their sensors mimic the trichromatic way our retinas respond to visible wavelengths of light and when they process the raw data from the sensor into a viewable image they also mimic the way our brains process the information gained from our retinas. But our color reproduction systems rarely, if ever, use three primary colors that match the three respective wavelengths of light to which the three types of cones in the human retina are most responsive.
¹ There are a very few rare humans, almost all of them female, who are tetrachromats with an additional type of cone that is most sensitive to light at wavelengths between green (540nm) and red (565nm). Most such individuals are functional trichromats. Only one such person has been positively identified to be a functional tetrachromat. The subject could identify more colors (in terms of finer distinctions between very similar colors - the range at both ends of the 'visible spectrum' were not extended) than other humans with normal trichromatic vision.
² Keep in mind that the "red" filters are usually actually a yellow-orange color that is closer to "red" than the greenish-blue "green" filters, but they are not actually "Red." That's why a camera sensor looks blue-green when we examine it. Half the Bayer mask is a slightly blue-tinted green, one quarter is a blue-tinted purple, and one-quarter is a yellow-orange color. There is no filter on a Bayer mask that is actually the color we call "Red", all of the drawings on the internet that use "Red" to depict them notwithstanding.
³ There are very minor differences in the amount of energy a photon carries based on the wavelength at which it is vibrating. But each sensel (pixel well) only measures the energy, it doesn't discriminate between photons that have slightly more or slightly less energy, it just accumulates whatever energy all of the the photons that strike it release when they fall on the silicon wafer within that sensel.
We ended up with RGB because they're a reasonable match to the way the three types of cones in our eyes work. But there's no particularly privileged set of wavelength choices for Red, Green, and Blue. As long as you pick wavelengths that are a good fit for one set of cones each, you can mix them to create a wide range of colours.
The way colours are measured for colour management uses XYZ tristimulus values - basically, an equivalent of cone responses in the eye. Any combination of wavelengths/brightnesses that produce the same XYZ value will look the same.
Picking a set of wavelengths that each mainly trigger one type of cone and trigger the other two as little as possible allows the biggest range of colours. Changing wavelengths a bit (and thus shifting the cone responses) will give a slightly different range of colours that can be achieved.
So there's no unique set of precise wavelengths for primary colours, any more than there is for subtractive paint colours.
What I find amazing: The French physicist, Gabriel Lippmann, devised a color photo method in 1891 that used only black & white film, no filters, no dyes, and no pigments. Constructing glass plates with a mirror on the reverse, he coated them with a clear emulsion consisting of super tiny silver halide crystals. Light rays traverse the emulsion, hit the mirror, then reenter, exposing the plate a second time from the rear. The first transit is insufficient to expose, the second supplies the needed light energy. The resulting image is a stacking of metallic silver. The positioning of this silver is layered based on the wave length of the exposing light. When the plate is illuminated from the rear, the light that now traverses the plate can only get through if it exactly matches the frequency of the exposing light. The result is a beautiful full-color image. Because making this image is difficult and because of difficulties encountered when making a copy, this process fell by the wayside.
Dr. Edwin Land, of Polaroid fame, as part of his research designing an instant color film, repeated James Clark Maxwell’s method that made the first color picture of 1855. Maxwell used red, green, and blue filters. Land was able to repeat the same image using only red and white however his Polaroid color film was based on red, green, and blue filtration.
Scientist working to make a color TV system were able to send color pictures (false colors however) on ordinary black & white TV sets. They strobed the image at different rates, this stimulated the eye/brain to see colored images.
How about this for odd: In 1850 Levi L Hill, a Baptist minister, a Daguerreotypist in Westkill, NY, demonstrated color Daguerreotype plates. These were seen by the editor of Daguerreian Journal and Hill was offered $100,000 if he published. In 1852 he did publish but the paper was too rambled to be of value. There can be no doubt he has succeeded. None other than Samuel Morse, of More Code fame, witnessed this process. No sample survived however other Daguerreotypists clam they accidently produced a full color image. To my knowledge color from a Daguerreotype was never again repeated. Speculation is, this was an interference process similar to what Lippmann had accomplished.
Modern color printing unitizes the three subtractive primaries which are cyan (green + blue), magenta (red + blue), and yellow (red + green). This is because prints are viewed via light from a nearby source. This light transverse the dye or pigment which is transparent, hits a white subbase, reflects back and transverses the dyes for a second time. This works because cyan is a red blocker, magenta is a green blocker and yellow is blue blocker. It is the intensities of these subtractive primaries that presents to our eye, a color picture. Color negative and slide film also use subtractive primaries. These modulate the light that transverse the film forming a color image.
Earth’s atmosphere filters out a high percentage of the electrometric energy that bombards us from outer space. That being said, our atmosphere is highly transparent to a narrow range, about one octave in width, 400 millimicrons (millionth of a millimeter) to 700 millimicrons. There can be little doubt that mankind’s sight evolved due to this range of transparencies.
Many theories of color vision have been proposed and discarded. However, as a result of countless thousands of experiments, it has been found that most all colors can be matched by suitable mixtures of red, green, and blue -- hence these colors are labeled as the primary light colors.
In the study of the pathology of vision, three types of cells, sensitive to color have been identified. These are called cone cells because of their shape. Further, these cells have been found to contain pigments that agree with what colors they are sensitive to. Just recently, it was discovered that 12% of women are blessed with enhanced color vision due to a fourth type of cone cell granting them a greatly expanded range of discernible hues. The lesson is that this is an ongoing science.
That's an interesting question, which can raise deep comments.
There are several aspects to consider.
- The first aspect is the physics of colors. We can observe the visible spectrum and see that R, G and B are 1) having the most significant surface and 2) are equally spaced between each others 3) the spectrum as a line can be seen as a circle, in which the purple is built from blue and red, and in that case 2) is more completely valid. So there are two phenomenons here: 3) the importance of the selected colors, and 4) the expressiveness of those 3 colors to express the full spectrum by addition.
The second aspect is the biochemistry and ecology of colors. Electromagnetic fields as photons have a specific color (wavelength) are related to a specific range of molecular phenomenons, such as atom-atom vibration, bound-bound angle vibration, chemical absorption (HOMO-LUMO electron transitions) by organic molecules or organo-metalic molecules (which is exactly how colors are made in Nature, as well as by humans with pigments and colorants), and their emergence in nature (emergence as one key phenomenon in Darwin's natural selection theory) is not to my knowledge something that have specific arguments and that was discussed in science. The emergence of color detectors is another phenomenon that can be (probably is) related to the emergence to color expressiveness. Nature is made primarily (in evolution time and in importance) of plants, which are green, hence the ability to distinguish different greens has its importance (for survival), and we human still have a greater sensibility toward the greens than all the other colors. The way we humans are featured of eyes with a certain ability to see colors is the result of this evolution, together with chemistry (naturally emerging colors) of nature, behavior (of plants and animals). Specifically, Nature selected those three colors (as we name them), but this is a qualitative difference, the quantitative difference happens mostly on the greens and the intensity of light (we see more the luminosity than the actual color).
The human making of the primary colors is more influenced by the physics, the attempt to make a theory, and the expressiveness rather than our natural abilities. This has its limits as sensors and screens have a lower expressiveness than nature and lower detection abilities in the greens than us, and as technology advances, expressiveness in the greens improves (as well as in luminosity with HDR screens). Even though camera sensors have twice as much green sensors than the other colors. It is possible that if we were recording more than 3 ranges of colors but say 6 (eg in a foveon sensor, probably not in a bayer sensor), we would have much better recording and rendering of the reality. In a nutshell, primary colors are more convenient in many aspects than an absolute reality. If we were able to see infrared like few serpent species, we might need to add a 4th primary color to screens and camera sensors.
No. This particularly enfuriating for car repairs since what looks like a perfect color match under sunlight might already be off in cloudy conditions and may look totally patchy under sodium-vapor street lights.
The situation is particularly bad for reflective colors/paints (let alone luminescent colors "reflecting" at wavelengths different from what they are receiving, popular as "whiteners" in laundry detergents) since they are the link between the continuous spectrum of a light source and the receptivity curves of eye cones, but it is already a problem for colored light from scenes taken in by sensors (or photo material) not matching the sensitivity curves of the human eye. That's what gives us things like "white balance" settings and skylight filters.
Producers of various kinds of paints and pigments (and lights) cannot afford looking just at three points in the spectrum: they have special grid-based filters for getting a more fine-grained view of the color spectrum.
Fine art museums still tend to use incandescent light since that tends to match sunlight spectrum best, and that's the light that original pigments in the past were selected and judged with.
If we had cells signaling on yellow (wavelength about 580nm) in our eyes then yellow would be a primary color of light.
However we don't. Therefore we perceive yellow differently, namely when cone cells for red and green are simultaneously activated. There are several ways how this can happen:
We have a light source of wavelength of about 580nm. Let's say it's a yellow flower in sunlight. We see this as yellow because our color perception is not precise. The light-sensitive cells in the retina also signal when the wavelength is not exactly right. So the yellow light both stimulates red and green. For the cells that are stimulated for red light the yellow light is slightly off but not too much. Similarly for green. So both red and green is signaled and we perceive that as yellow.
We have two light sources, one red and the other green. Let's say these are pixels on a computer screen. If you look at a yellow pixel with a magnifying glass you will discover two tiny spots, one green, one red. Because of that both green and red is signaled and we perceive that as yellow.
Also possible is a mixture of both, for example three light sources, red, yellow and green; or a smooth or wavy spectrum of light. All that matters is that red and green are both stimulated to yield the perception of yellow.
These ways are very different, but we perceive them indiscriminately as yellow.
Imagine an extraterrestrial alien who has yellow as a primary color. She would find our color prints and screens lacking. She would think we would be partially color blind not seeing the difference between the world she perceives and our color prints and screens.
This means that the primary colors of light are just artifacts of our color perception.