<p><strong>TL;DR:</strong> The RGB model isn't really a model of how light works.  It's a model of how our vision system processes color.  Red, green, and blue are like keys that manipulate our vision system; that's what makes them primary colors.  The creation and use of RGB colors &quot;hacks&quot; our vision system to create optical illusions of color that we can't distinguish from real color.  The answer explores the integral relationship between RGB and our vision system for an appreciation of why RGB are the primary colors.  CMY is an extrapolation of RGB.</p>
<h2>RGB</h2>
<p><strong>Color Vision</strong></p>
<p>Color is how we perceive different light wavelengths.  Virtually all of the characteristics of how colors interact are defined by how our vision system processes and perceives color.  So let's start with color vision.</p>
<p>Visible light is a continuum of wavelengths.  We need an efficient way to process the near-infinite color information that bombards us in real-time.  Nature has come up with a solution.  Our vision system performs some simplifications and abstractions.  It reduces color to a &quot;shorthand&quot; representation, which is what our brain then uses.</p>
<p><strong>How it works and why RGB are primary colors</strong></p>
<p>Our eyes have three kinds of photoreceptors for color vision (cones).  They react to short, medium, or long wavelengths of light, and their sensitivities overlap.</p>
<p><a href="https://i.sstatic.net/2KPHj.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/2KPHj.png" alt="image" /></a>
<a href="https://commons.wikimedia.org/wiki/File:Cone-fundamentals-with-srgb-spectrum.svg" rel="nofollow noreferrer"><em><sub>source</sub></em></a></p>
<p>Notice that the sensitivity curves don't evenly divide the color spectrum, with one type sensitive to blue, one to green, and one to red.  In fact, the medium and long wavelength cones almost (but not quite), completely overlap. At the far ends of the spectrum, it is mainly one kind of cone that is stimulated.  For most of the spectrum, a given wavelength stimulates either two or three kinds of cones to some extent.</p>
<p>Each type of cone will react to a broad range of colors, but can't tell what color light stimulated it.  Any wavelength it is sensitive to will stimulate it, but the closer the wavelength is to the cone's sensitivity peak, the more it will be stimulated.</p>
<p>Your vision system interprets this by comparing the output signals of the three kinds of cones to each other to deduce what color light would have produced that combination of reactions.  The result is translated to a color representation, which is what we perceive.</p>
<p>Red, green, and blue are like code keys that trigger perception of a given color.  Their ability to trigger a whole gamut of color perceptions that mirror our experience with real color is what makes them primary colors.</p>
<p><strong>Could different primary colors work?</strong></p>
<p>The short answer is no.  A longer explanation:</p>
<p>Color (your experience of it), is what your vision system says it is, and it behaves as your vision system is designed.  Any other primary color scheme won't produce the same result when processed by your vision system.</p>
<p>One reason is that, in part, externally created RGB output works through optical illusions, tricking your vision system based on how your cones work and how their output is interpreted (more explanation later).  To do that, any color system needs to mirror how your vision system works, including the sensitivity profiles of the cones.</p>
<p>Another reason is that RGB is a simplification.  Color information that isn't needed to perceive color is discarded (more explanation later).  There are holes in the color information that don't usually affect you.  A different primary color scheme will have a different set of holes, which won't align with how your vision system processes color.</p>
<p><strong>RGB vs. Vision System</strong></p>
<p>In nature, color is a linear progression of wavelengths, not a color wheel.  Red, green, and blue are simply three colors that can be combined independent of the color spectrum, so the linear nature of the spectrum becomes irrelevant.  That allows treating them as a color wheel, and representing colors that don't exist as a wavelength in the visible spectrum.</p>
<p>For example, blue light is at one end of the visible sprectrum, and red light is at the other.  There is no wavelength for magenta.  But magenta can be represented with the RGB information.</p>
<p>Our vision system normally provides good color perception if it is interpretting the color of real objects illuminated with broad-spectrum light.  But if we artificially create colors or illumination using RGB, some strange things can happen.</p>
<p>RGB electronic displays don't really reproduce the colors reflected off the original, illuminated object.  They produce optical illusions that your vision system interprets as the intended color.  Your vision system can't differentiate whether it is seeing normal light or RGB.  That allows coding of &quot;misinformation&quot; to trick your vision system.  In this case, we're using it as a benefit.  (I'll cover some examples below.)</p>
<p>If you illuminate with RGB light, it can mess up colors and illustrate the holes in the color information.  Although the light can look white, the wavelengths needed to reflect the color of objects may be missing or limited, so objects can look miscolored or dark.  That's why the color rendering index was created for light bulbs, as @ChrisH mentioned in a comment.  <a href="https://www.youtube.com/watch?v=uYbdx4I7STg" rel="nofollow noreferrer">This video</a> linked by @eyeballfrog in a comment does a great job illustrating the difference between true white light and RGB white, and the effects.</p>
<p><strong>Examples of how external RGB output can manipulate your brain</strong></p>
<p>Your brain deals with an abstraction of reality.  If necessary, it extrapolates what a color combination should look like, even if you have never seen that combination in real life.  For example, yellow and blue light combine to produce white, so you can never see the (additive) color yellow-blue in real life.  But if you view yellow light in one eye and blue light in the other, you can trick your brain into inventing the color yellow-blue (which looks like a combination of what yellow and blue each look like, not green).</p>
<p>So how can you create white light by combining only red, green, and blue light?  You don't.  It's an optical illusion.  If you provide your eyes with red, green, and blue light, your vision system reacts with the same response as to white light, so your brain interprets it as white.</p>
<p>How can mixing red light and green light produce yellow light?  It doesn't, it's another optical illusion.  The medium and long wavelength cones are sensitive to ranges of color that straddle the yellow wavelength.  Yellow light triggers both kinds of cones, and that ratio of activity is interpreted as having been caused by yellow light.  But the raw signal that is being interpretted is that both the medium and long wavelength cones have been stimulated.  Instead of yellow light, those two cones can be similarly stimulated by the right combination of red light plus green light.  The cones don't know what part of the light spectrum did it, and your vision system interprets it as yellow.</p>
<h2>What makes RGB the &quot;cone code&quot;?</h2>
<p>I'll circle back to elaborate on what makes RGB the cone code.</p>
<p>The vision system deciphers color via how the cones respond to it.  It is able to discern and differentiate every color in the visible spectrum because every color stimulates a unique pattern of cone responses.  It also isn't a mix and match, where the response patterns are unique but&quot;random&quot;, and the vision system matches them to a table of colors.  As you move across the spectrum, the cone output patterns follow smooth, complex curves that the vision system is designed to interpret.</p>
<p>Colors that are close to each other on the spectrum produce output patterns that are similar, and the perceived colors look similar.  The spectrum looks like a rainbow because as you move across the wavelengths, the color we perceive follows the pattern, with one color blending smoothly into the next to form a continuum of hues.</p>
<p>The vision system cares only about the net output of each cone, it doesn't care how the cones got stimulated to produce that output.  Intense light of a wavelength near the tail of the sensitivity distribution can stimulate the cone to the same output as weak light of a wavelength near it's peak sensitivity.</p>
<p>This was adequate during evolutionary times because everything was illuminated by broad-spectrum light (the sun, fire, etc.).  The vision system could assume that the cones were all responding to the same distribution of light wavelengths. It only needed to compare the cones to each other to interpret the output.</p>
<p>With modern technology, we can fool the vision system to perceive colors by artificially stimulating the cones with the right wavelengths and intensities on other parts of their sensitivity curves to produce the same output pattern.</p>
<p>The problem is that for most of the spectrum, two or three kinds of cones will be stimulated by whatever wavelength you use.  For example, when using a combination that includes reddish light and greenish light, the reddish light will stimulate both the M and L cones to some extent, and the greenish light will also stimulate both the M and L cones to some extent.</p>
<p>The output of each cone reflects its total stimulation.  It becomes a puzzle to pick the right combination of wavelengths and intensities so the net stimulation of each cone matches its response for the intended color.</p>
<p>For most of the spectrum, you could find multiple combinations of wavelength and intensity to evoke a particular color.  But what if you want to evoke all possible colors using the smallest number of triggering wavelengths, varying only their intensity (i.e., primary colors)?  One requirement is that you would need to use a set of wavelengths that allows each type of cone to have the strongest response on at least one.</p>
<p>Looking at the sensitivity curves, that would require at least a wavelength in the blue range for the S cone, a wavelength in the greenish range for the M cone, and a wavelength in the reddish range for the L cone.</p>
<p>But that's not sufficient, there are requirements for the response patterns of each cone compared to the others.  Varying only the intensity of each fixed, component wavelength needs to produce a cumulative response matching not just a single color, but all of the patterns for the spectrum.  The results also need to be a continuous progression of color as you increment the intensity of a component wavelength.</p>
<p>That's a lot of complex requirements and constraints.  But there happen to be &quot;Goldilocks&quot; spots in those three color ranges that allow you to use just three wavelengths to simulate most of the spectrum.</p>
<p>Because each selected wavelength needs to influence multiple cones for this scheme to work, the selected wavelengths can't be at the extremes of the visible spectrum, where a single type of cone is responsive.  The bluest blue this can evoke is the selected blueish wavelength at 100% intensity, and the reddist red it can evoke is the selected reddish wavelength at 100% intensity; this trick can't evoke colors farther out on the spectrum.  Thus, the gamut of RGB primary colors can't include the entire visible spectrum.</p>
<h2>CMY</h2>
<p>Since RGB models how our brains process additive color, CMY (the color space), is an extrapolation of it for subtractive color.  It just works in reverse using the RGB primary colors (note that CMYK is a different conversion).</p>
<p><a href="https://i.sstatic.net/fO18n.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/fO18n.png" alt="enter image description here" /></a></p>
<p>In this chart, &quot;nothing&quot;  is the absence of color being contributed.  On an RGB device, &quot;nothing&quot; would appear as the background color of the device, which might not be pure black.  On a CMY application, &quot;nothing&quot; would be the background color of the media, which might not be pure white.</p>
<p>Theoretically, every color in one model can be expressed in the other; one is just the inverse of the other.  In real life, colors created from CMY primary colors are often muddy, not like the equivalent RGB color that the model suggests.  The model isn't wrong.</p>
<p>The problem is with how the colors are implemented.  There are issues like the colors being created by mixing pigments, or colorants that aren't a pure color, so you don't get pure subtractive color.  When CMY colors are created, the conversion is much more complex than the chart above describes because of the need to compensate for real life considerations like available colorants and how they behave.  But that's a subject for another question.</p>

CC BY-SA 4.0
2022-04-06T06:30:28.357Z
That's a nice, and comprehensive, answer, so I don't suggest adding this, but the complexity is hinted at by light sources with narrow emission bands (e.g. sodium street lights and non-white LEDs) especially in combination with materials that have narrow transmission or reflection bands (some pigments/dyes, both natural and synthetic). This leads to the concept of the colour rendering index for lights
Chris H
CC BY-SA 4.0
2022-04-06T12:09:17.440Z
[This youtube video](https://www.youtube.com/watch?v=uYbdx4I7STg) does a great job illustrating the difference between true white light and RGB white.
eyeballfrog
CC BY-SA 4.0
2022-04-06T12:57:40.417Z
_"Every color in the visible spectrum stimulates either two or three kinds of cones to some extent"_ — at the ends of the visible spectrum we mostly get stimulation of one kind of cones. In particular, at 400 nm the ratio of sensitivities (normalized to peaks) of S to M cones is about 25, while at 800 nm similar ratio of L to M is about 11. (Numbers taken from 2° LMS fundamentals available [here](http://www.cvrl.org/ciepr.htm)).
Ruslan
CC BY-SA 4.0
2022-04-06T17:59:53.440Z
I think this may be simplifying it too much, "Red, green, and blue are the color components that your vision system uses to encode color information;" The way our vision system encodes color information is a bit complicated and I don't understand it very well, but we start with the LMS signals from the different cones and produce different signals (opponent or complementary, or something else) derived from those, and I don't think at any point we can really say that the signal is encoded as "RGB".
Dietrich Epp
CC BY-SA 4.0
2022-04-06T21:39:51.583Z
_"...Red, green, and blue are the color components that your vision system uses to encode color information;..."_ - that's not quite true.  Your vision system is all about converting the relative intensities from the S, M and L cones into something we see as a "colour".  Encoding into RGB isn't part of that process.  The only reason why computer screens, TVs, cameras and so on use RGB is because it's a system that lets you encode a large subset of the colours that we can actually see.  The RGB space is not actually a property of the human vision system at all.
Dawood ibn Kareem
CC BY-SA 4.0
2022-04-06T21:55:40.407Z
just fyi A helpful resource going all the way from basic theory to the practicalities of color in manufacturing (which may be particularly suitable here in Crafts SE) is [Billmeyer and Saltzman's Principles of Color Technology, 4th Edition](https://www.wiley.com/en-us/Billmeyer+and+Saltzman%27s+Principles+of+Color+Technology%2C+4th+Edition-p-9781119366683)
uhoh
CC BY-SA 4.0
2022-04-06T23:51:16.220Z
@DawoodibnKareem, I've been wrestling with how to better word that.  The SML cone output is translated into red, green, blue color space for us to experience color.  RGB in electronics output works because it uses the primary colors and rules that match how our vision system works.  I'll see if I can make that a more accurate description.  Thanks.
fixer1234
CC BY-SA 4.0
2022-04-07T00:33:01.710Z
I don't feel that last comment is quite right either, @fixer1234.  There are actually lots of visible colours that are outside the gamut of RGB.  I'll try to write my own answer if I have time.
Dawood ibn Kareem
CC BY-SA 4.0
2022-04-07T00:48:13.987Z
@DawoodibnKareem that's because RGB describes a triangle, but our color perception is not perfectly triangular, plus physically realizable RGB primaries don't get all the way to the edges.  See the [CIE color diagram](https://en.wikipedia.org/wiki/CIE_1931_color_space#CIE_xy_chromaticity_diagram_and_the_CIE_xyY_color_space).
Mark Ransom
CC BY-SA 4.0
2022-04-07T00:54:38.240Z
Yes, I know.  I don't think an answer to this question can be considered complete, without mention of the CIE colour diagram.  @MarkRansom
Dawood ibn Kareem
CC BY-SA 4.0
2022-04-07T02:35:22.420Z
There is one thing missing here though touched upon lightly. In the visible spectrum there is no such color as white. White does not exist. Instead the color of light form the sun contains almost all the frequencies in the visible spectrum almost at their maximum values. We have evolved to see sunlight as a neutral color - "white". This makes sense since this is the color that a white (or silver) surface reflects - all of them (white just means it absorbs none of the wavelength). So if you max R G and B it simulates sunlight by transmitting all of the colors.
slebetman
CC BY-SA 4.0
2022-04-08T10:29:25.017Z
@slebetman reflective colors and definition of "white" is another can of worms, where chromatic adaptation comes in. Touching this would expand this answer quite a bit, into a mostly irrelevant direction.
Ruslan
CC BY-SA 4.0
2022-04-05T23:34:53.450Z
2022-04-09T02:56:28.610Z
2022-04-09T02:56:28.610Z
fixer1234
<p>I'm the author of this image that was used in the top-voted answer:</p>
<img src="https://i.sstatic.net/2KPHj.png" width="320">
<p><s>and I do not endorse that answer.</s> (It's been edited, and I haven't looked at the edit yet.)</p>
<p>I made that image to disabuse people of the misconception that we see RGB. People commonly say that the three types of cone &quot;detect red, green, and blue light&quot;, and you can see in the image that that isn't true at all. The other answer acknowledges that discrepancy, but saves the misconception by modifying it slightly into a form where postprocessing in the brain turns the cone responses into RGB. That's still wrong. <em>RGB is not the internal color space of the brain</em>.</p>
<p>(That should be obvious, because which RGB would it be? There are many sets of additive primaries called &quot;RGB&quot;, including CIE RGB, Adobe RGB, Rec.601, sRGB, and Rec.2020. Today, sRGB dominates, but that's for reasons of engineering and interoperability, not because it matches the brain's internal color space more closely than the others.)</p>
<hr />
<p>It's true that there is a three-dimensional space of psychological colors, because there are three cone types. It's also true that the brain transforms the cone outputs into a different &quot;coordinate system&quot;. But it isn't RGB. The internal color axes seem to be dark/light, red/green, and blue/yellow, as explained in Wikipedia's article on the <a href="https://en.wikipedia.org/wiki/Opponent_process" rel="noreferrer">opponent process</a>. Here's a picture of the opponent colors from that article:</p>
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/71/Opponent_colors.svg/320px-Opponent_colors.svg.png">
<p>Note that there are four opponent hues, not three, and the three that most closely match the sRGB primaries don't actually match them very closely. The opponent-process blue is essentially sky blue, but the B of sRGB is quite violet, as you can see in this image where a rectangle of it is superimposed on a photograph of the sky:</p>
<img src="https://i.sstatic.net/z9vsg.png">
<p>The name RGV was sometimes used historically instead of RGB for three-primary additive systems.</p>
<hr />
<p>So where do RGB and CMY come from?</p>
<p>First of all, you need at least three primaries to get good color, because with two primaries, you only have two parameters (the quantity of each one) and so you can't cover more than a two-dimensional subspace of the three-dimensional space of psychological colors.</p>
<p>With three primaries, you still can't cover the whole space, but you can cover a three-dimensional subspace at least. If the primaries are well spaced around the color wheel, then you can produce every hue. If they're saturated (far from the dark/light axis), then you can produce fairly well saturated hues.</p>
<p>Beyond that, it comes down to practical engineering issues: some pigments and phosphors are (or were) cheaper to manufacture than others. When you optimize subject to all of these constraints, you end up with red-green-violet(blue) for lights, or red-yellow-blue for pigments. The historical red-yellow-blue systems evolved into the CMY systems used in printing today. Here's a side-by-side comparison of the primaries from Moses Harris's &quot;prismatic color wheel&quot;, drawn circa 1785, and an extreme close-up of CMY dots on newsprint:</p>
<img src="https://i.sstatic.net/TVf9H.jpg">
<p>More primaries are better. You can't reproduce every color with three. That's especially true of paints/inks, which are far more complicated than emissive displays like TVs, because the mixing behavior is nonlinear, and the appearance of the result depends also on the illuminant. Three colors is just the minimum that gets you acceptable results.</p>
<hr />
<blockquote>
<p>Red, green, and blue are the only (additive) colors that cannot be created by mixing other colors. What makes them primary colors, or even unique?</p>
</blockquote>
<p>Nothing. You can make them by mixing other primaries, if you choose other primaries.</p>
<blockquote>
<ul>
<li>The RGB model says red light plus green light produces yellow light. Each color has its own wavelength. How can combining two wavelengths produce a third, all in the same wavelength ballpark?</li>
<li>White light is a collection of all the wavelengths of visible light. Red, green, and blue light are just three wavelengths. How can just red, green, and blue create all the other wavelengths in white light?</li>
</ul>
</blockquote>
<p>The primaries in RGB systems aren't wavelengths. Color vision has nothing to do with spectral/rainbow colors. (This is another common misconception, which often manifests as people claiming that magenta is &quot;not a real color&quot;.) Color vision evolved for other reasons, and the appearance of the spectrum is an evolutionary accident. Yellow is between red and green in the 3D cone space, and also in the spectrum. Violet is between red and blue in the 3D cone space, but not in the spectrum. That doesn't mean anything. The spectral colors doesn't matter.</p>
<p>Here are the wavelength spectra of primaries from particular CRT, AMOLED, and LED-backlit LCD displays:</p>
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/29/CRT_phosphors.png/360px-CRT_phosphors.png">
<img src="https://www.researchgate.net/profile/Aaron-Quigley-4/publication/319440880/figure/fig4/AS:614169539788816@1523440837705/Measured-screen-emission-spectral-for-Galaxy-S6-AMOLED-and-Nexus-5-LCD-The-line.png">
<p>None of these violate the sRGB standard, as long as they result in the same tristimulus values (up to overall brightness). This is something that fixer1234's answer basically gets right, except that it's couched in the idea that RGB is the brain's internal color space, which is wrong. What matters is only that the internal color space is three dimensional, while wavelength space has a much higher dimension (theoretically infinite), and as a result you have a huge freedom in choosing wavelength spectra that will map down to the same 3D point.</p>
<blockquote>
<p>So how can you create white light by combining only red, green, and blue light? You don't. It's an optical illusion.</p>
</blockquote>
<p>This is just wrong, unless you specifically define white to be the spectrum of sunlight. Even then, you could engineer a sRGB-compliant display whose primaries added to a close approximation of sunlight when displaying white, if there were any reason to do that. You can see from the graphs above that the output of real displays when displaying white is actually a pretty broad spectrum. The (AMO)LED display has the narrowest peaks, unsurprisingly, but even those are pretty broad.</p>
<p>A big part of the problem is that the same words that describe psychological colors are also used to refer to spectral frequencies. &quot;Combining only red, green, and blue light&quot; sounds like a spectrum with three sharp spikes, but it's not. The word &quot;only&quot; shouldn't be there; there's no &quot;only&quot; about it.</p>
<blockquote>
<p>Since RGB is how our brains process additive color, CMY is an extrapolation of it for subtractive color. It just works in reverse using the RGB primary colors. [...]</p>
</blockquote>
<p>The theory of mixing pigments is much more complicated than the theory of mixing lights. Even in the simplest model, the absorptive effect of different pigments doesn't subtract, but multiplies (or adds logarithmically). As a result the perceived color depends nonlinearly on the amount of each pigment, in a way that can't be modeled by tristimulus values. It also depends on the illuminant, which is a complication that doesn't exist in emissive color (though ambient lighting conditions do affect how colors from emissive displays are perceived).</p>
<p>So it is not at all true that CMY is the opposite of RGB. This is another weirdly common misconception. If you do a web search for &quot;RGB CMYK conversion&quot; or words to that effect, you'll find innumerable sites that literally just compute K = 255 - max(R,G,B), C = 255 - K - R, etc. I'm amazed that anyone really believes that CMYK is that simple: if it were, why even bother to define a separate standard? You could just compute 255-R in the printer.</p>

CC BY-SA 4.0
2022-04-07T20:16:19.803Z
Thank you so much for posting this, it clears up a lot.
Spencer Fleming
CC BY-SA 4.0
2022-04-08T01:00:47.663Z
Thanks for this answer.  I'll just post some thoughts. We can discuss in chat if you want. Key points: 1)My original writeup did incorrectly describe RGB as the internal color space. That's been corrected. What's described now is how RGB acts like a cone code to evoke colors. 2)We still don't know the internal color system for sure. The opponent process has fallen out of favor because of certain inadequacies. (cont'd)
fixer1234
CC BY-SA 4.0
2022-04-08T01:01:19.340Z
3)For the purpose of creating color in the real world, there are various versions of RGB, and added primaries for a better gamut, various CMY variants, including added primaries, use of alternative primary combinations as long as they can produce the desired color subset, adjustments for pigments, etc.  From a basic color theory perspective, what is typically used to describe the visible color space (to the extent it can, as generically close as possible to vision, with 3 primaries that add up to white or black), is RGB for additive color and CMY for subtractive color. (cont'd)
fixer1234
CC BY-SA 4.0
2022-04-08T01:01:56.727Z
Are you saying there is no basis for that; if people had understood color better, there might be a different combination being taught? Is RGB the primaries in emissive displays only for a reason like it happens to be cheap to make those colors? 4)"The primaries in RGB systems aren't wavelengths. Color vision has nothing to do with spectral/rainbow colors." The gamut perimeter is defined in terms of wavelengths, and the corners of the triangle have to be defined. Color vision is based on how light wavelengths trigger cones, and RGB display colors need to be precise wavelengths.  (cont'd)
fixer1234
CC BY-SA 4.0
2022-04-08T01:02:05.087Z
Having a tough time on this one. 5)'"Combining only red, green, and blue light" sounds like a spectrum with three sharp spikes, but it's not.' In practice, emissive displays aren't narrow peaks.  But my understanding is they could be, and they would still fool the cones and produce a similar result. 6)CMYK is a different conversion than CMY, but the theoretical conversion for CMY actually is as simple as 255-R. That's not adequate in the real world, like for printers, because printers don't use perfect colors or processes.
fixer1234
CC BY-SA 4.0
2022-04-08T02:52:31.743Z
I am clearly not as informed as @benrg, my my takes are:
3. RBG is chosen because it has a very big gamut. The reason to use sRGB instead of a bigger/better RGB space is cost of materials. 
4. Primaries in RGB are defined in Cie XYZ, which has three parameters and represents perceived color, not wavelength which is a single parameter. You could in theory have magenta as a primary color.
Spencer Fleming
CC BY-SA 4.0
2022-04-08T10:39:33.360Z
_"but the B of sRGB is quite violet, as you can see in this image "_ — but the rectangle in the image is not sRGB blue, or something has gone wrong with my browser which shows it as `#444488`.
Ruslan
CC BY-SA 4.0
2022-04-07T19:49:15.657Z
2022-04-08T01:04:52.723Z
2022-04-08T01:04:52.723Z
benrg
<p>As a follow up to fixer's answer, there's no specific wavelength of R, G, and B that have to be used. They are chosen to get the largest possible range of what we can see.</p>
<p>Also, as pointed out by benrg, the R G B values are not wavelengths but colors. Two spectrum that produce the same color would be equally valid (ignoring the effects on reflections and refractions)</p>
<p>If you pick specific values for Red, Green, and Blue you define an Absolute color space <a href="https://en.wikipedia.org/wiki/Color_space#Absolute_color_space" rel="noreferrer">https://en.wikipedia.org/wiki/Color_space#Absolute_color_space</a></p>
<p>If you look at this chart of various RGB color spaces there's quite a few choices. <a href="https://en.wikipedia.org/wiki/RGB_color_spaces" rel="noreferrer">https://en.wikipedia.org/wiki/RGB_color_spaces</a></p>
<p>It should also be possible to intuitively see why a triangle made of different colors than Red, Green, and Blue would be inefficient and leave out colors that we can see.</p>
<p><a href="https://i.sstatic.net/drNRy.png" rel="noreferrer"><img src="https://i.sstatic.net/drNRy.png" alt="different RGB color spaces" /></a></p>
<p>Note that even the bigger RGB color spaces do not capture everything.</p>

CC BY-SA 4.0
2022-04-07T15:05:33.323Z
Thanks for adding this to the discussion.  One question for clarification. re: "there's no specific wavelength of R, G, and B that have to be used. They are chosen to get the largest possible range of what we can see...the exact RGB values have bounced around quite a bit" - can you distinguish between "internal" and "external"? Vision is based on physiological characteristics that don't change, so there must be precise primary colors for that system for interpretting light input. People have played with defining the corner points to create the biggest gamut that a RGB color space can describe.
fixer1234
CC BY-SA 4.0
2022-04-07T15:34:34.087Z
I'm not totally sure what you mean by Internal vs External. Primary colors are just a a limited set of colors that can be mixed to produce all others. In theory, a D65 white in SRGB would look the same as the white in Adobe RGB even though they are a different mix of different wavelengths
Spencer Fleming
CC BY-SA 4.0
2022-04-07T15:50:43.997Z
@fixer1234 There are actually no three primary colors that would create all colors from the visible spectrum just by simple addition - any choice would need negative components for some colors. See https://www.feynmanlectures.caltech.edu/I_35.html
Erbureth
CC BY-SA 4.0
2022-04-07T16:09:40.827Z
I guess the distinction is "produce" vs "interpret" (primary colors aren't just for production). The vision system interprets incoming light in a way fixed by phisiology, based on some primary colors defined by the vision system. People also produce colors using an RGB color space, and have experimented with the points of the triangle to maximize that gamut. RGB isn't a perfect explanation of how vision works.  But to the extent that it is, the primary colors it uses don't change. Internal vs external referred to how your body interprets color internally vs how you create colors externally.
fixer1234
CC BY-SA 4.0
2022-04-07T18:41:08.550Z
@fixer1234 There are no primary colors defined by our vision, only approximations.  If you pick any 3 colors, you can mix them to get any of the colors inside their triangle but you can't get anything outside the triangle.  And if you pick primaries that are outside the visible range, like ProPhoto, you can't make a device to display them because those primaries are invisible and won't generate any reaction in your eyes at all.
Mark Ransom
CC BY-SA 4.0
2022-04-07T21:32:46.427Z
@MarkRansom, I'm approaching this from the vision side rather than the color creation side.  Are you saying that the triggering wavelengths for the cones, at which RGB evokes the intended colors, does not imply an origin color space for the needed RGB values, with fixed underlying primaries? Or, the primaries for such a space do not have to be fixed (any variation on RGB will work but the perceived color might not be consistent)? Or, we can only estimate/approximate what those points must be? Or something else?
fixer1234
CC BY-SA 4.0
2022-04-07T22:05:37.460Z
@fixer1234 I'm saying that no matter which 3 primaries you pick, there are colors you can see that can't be generated by any combination of those primaries. You can use the CIE diagram to predict what those colors will be.
Mark Ransom
CC BY-SA 4.0
2022-04-08T01:16:22.530Z
@SpencerFleming, I'm not sure how much this comment thread would be of value to others.  If you think it just distracts from your answer, I can move them to chat.  Just upvote this comment if you want me to.
fixer1234
CC BY-SA 4.0
2022-04-08T02:55:25.143Z
Fine either way. And like Mark said, there is several color spaces that map the entire perceptive color space, Cie XYZ and LMS. You could even define every color in any given absolute RGB color space too, but it will anything with negative numbers isn't producible by a real world display.
Spencer Fleming
CC BY-SA 4.0
2022-04-07T14:36:12.557Z
2022-04-07T20:19:03.363Z
2022-04-07T20:19:03.363Z
Spencer Fleming
<p>The RGB color model is supposed to describe how additive color works, and the CMY model how subtractive color works.  But a number of things don't add up, some even appearing to violate laws of physics.  Just a few examples:</p>
<ul>
<li>Red, green, and blue are the only (additive) colors that cannot be created by mixing other colors.  What makes them primary colors, or even unique?</li>
<li>The RGB model says red light plus green light produces yellow light.  Each color has its own wavelength.  How can combining two wavelengths produce a third, all in the same wavelength ballpark?</li>
<li>White light is a collection of all the wavelengths of visible light.  Red, green, and blue light are just three wavelengths. How can just red, green, and blue create all the other wavelengths in white light?</li>
<li>If the color model is based on physics principles of how light works, it seems like it ought to explain the full range of wavelengths used for vision in the animal kingdom.  That whole range should behave similarly.  Why does it describe how colors work only for the color range of human vision.</li>
<li>The equivalent question for CMY.</li>
</ul>
<p>In other words, why (and how) are RGB and CMY the primary colors?</p>

CC BY-SA 4.0
2022-04-06T09:58:12.713Z
In addition to very good answer from fixer1234, look for term 'metamerism'.
Arvo
CC BY-SA 4.0
2022-04-07T12:39:48.210Z
There are quite a few similar questions in both Physics.SE and Photography.SE.
fraxinus
CC BY-SA 4.0
2022-04-07T20:31:40.127Z
Side note: Isn't CMY simply RGB offset by 60⁰?
csstudent1418
CC BY-SA 4.0
2022-04-07T21:43:20.340Z
@csstudent1418, you mean on the color wheel?  The set of CMY colors are rotated by 60 compared to the set of RGB colors, but there's more to the relationship than that, so "simply" doesn't apply.  :-)  It would be more accurate to think of them as rotated 180.
fixer1234
CC BY-SA 4.0
2022-04-11T00:12:25.453Z
@fixer1234 Oh wow true, I never realized that. That's why C is also the inverse of R etc ...
csstudent1418
<color>
Why are RGB and CMY the primary colors?
fixer1234
# Why are RGB and CMY the primary colors?

(Asked by: username_0 on 2022-04-05)

The RGB color model is supposed to describe how additive color works, and the CMY model how subtractive color works. But a number of things don't add up, some even appearing to violate laws of physics. Just a few examples:

* Red, green, and blue are the only (additive) colors that cannot be created by mixing other colors. What makes them primary colors, or even unique?
* The RGB model says red light plus green light produces yellow light. Each color has its own wavelength. How can combining two wavelengths produce a third, all in the same wavelength ballpark?
* White light is a collection of all the wavelengths of visible light. Red, green, and blue light are just three wavelengths. How can just red, green, and blue create all the other wavelengths in white light?
* If the color model is based on physics principles of how light works, it seems like it ought to explain the full range of wavelengths used for vision in the animal kingdom. That whole range should behave similarly. Why does it describe how colors work only for the color range of human vision.
* The equivalent question for CMY.

In other words, why (and how) are RGB and CMY the primary colors?

**Tags:** color

> **Comments:**
> **username_1**: In addition to very good answer from username_0, look for term 'metamerism'.  
> **username_2**: There are quite a few similar questions in both Physics.SE and Photography.SE.  
> **username_3**: Side note: Isn't CMY simply RGB offset by 60⁰?  
> **username_0**: @username_3, you mean on the color wheel?  The set of CMY colors are rotated by 60 compared to the set of RGB colors, but there's more to the relationship than that, so "simply" doesn't apply.  :-)  It would be more accurate to think of them as rotated 180.  
> **username_3**: @username_0 Oh wow true, I never realized that. That's why C is also the inverse of R etc ...  

---

## 3 answers

### Answer by username_0 on 2022-04-05. Score: 31

**TL;DR:** The RGB model isn't really a model of how light works. It's a model of how our vision system processes color. Red, green, and blue are like keys that manipulate our vision system; that's what makes them primary colors. The creation and use of RGB colors "hacks" our vision system to create optical illusions of color that we can't distinguish from real color. The answer explores the integral relationship between RGB and our vision system for an appreciation of why RGB are the primary colors. CMY is an extrapolation of RGB.

## RGB

**Color Vision**

Color is how we perceive different light wavelengths. Virtually all of the characteristics of how colors interact are defined by how our vision system processes and perceives color. So let's start with color vision.

Visible light is a continuum of wavelengths. We need an efficient way to process the near-infinite color information that bombards us in real-time. Nature has come up with a solution. Our vision system performs some simplifications and abstractions. It reduces color to a "shorthand" representation, which is what our brain then uses.

**How it works and why RGB are primary colors**

Our eyes have three kinds of photoreceptors for color vision (cones). They react to short, medium, or long wavelengths of light, and their sensitivities overlap.

[![image](https://i.sstatic.net/2KPHj.png)](https://i.sstatic.net/2KPHj.png)
[*source*](https://commons.wikimedia.org/wiki/File:Cone-fundamentals-with-srgb-spectrum.svg)

Notice that the sensitivity curves don't evenly divide the color spectrum, with one type sensitive to blue, one to green, and one to red. In fact, the medium and long wavelength cones almost (but not quite), completely overlap. At the far ends of the spectrum, it is mainly one kind of cone that is stimulated. For most of the spectrum, a given wavelength stimulates either two or three kinds of cones to some extent.

Each type of cone will react to a broad range of colors, but can't tell what color light stimulated it. Any wavelength it is sensitive to will stimulate it, but the closer the wavelength is to the cone's sensitivity peak, the more it will be stimulated.

Your vision system interprets this by comparing the output signals of the three kinds of cones to each other to deduce what color light would have produced that combination of reactions. The result is translated to a color representation, which is what we perceive.

Red, green, and blue are like code keys that trigger perception of a given color. Their ability to trigger a whole gamut of color perceptions that mirror our experience with real color is what makes them primary colors.

**Could different primary colors work?**

The short answer is no. A longer explanation:

Color (your experience of it), is what your vision system says it is, and it behaves as your vision system is designed. Any other primary color scheme won't produce the same result when processed by your vision system.

One reason is that, in part, externally created RGB output works through optical illusions, tricking your vision system based on how your cones work and how their output is interpreted (more explanation later). To do that, any color system needs to mirror how your vision system works, including the sensitivity profiles of the cones.

Another reason is that RGB is a simplification. Color information that isn't needed to perceive color is discarded (more explanation later). There are holes in the color information that don't usually affect you. A different primary color scheme will have a different set of holes, which won't align with how your vision system processes color.

**RGB vs. Vision System**

In nature, color is a linear progression of wavelengths, not a color wheel. Red, green, and blue are simply three colors that can be combined independent of the color spectrum, so the linear nature of the spectrum becomes irrelevant. That allows treating them as a color wheel, and representing colors that don't exist as a wavelength in the visible spectrum.

For example, blue light is at one end of the visible sprectrum, and red light is at the other. There is no wavelength for magenta. But magenta can be represented with the RGB information.

Our vision system normally provides good color perception if it is interpretting the color of real objects illuminated with broad-spectrum light. But if we artificially create colors or illumination using RGB, some strange things can happen.

RGB electronic displays don't really reproduce the colors reflected off the original, illuminated object. They produce optical illusions that your vision system interprets as the intended color. Your vision system can't differentiate whether it is seeing normal light or RGB. That allows coding of "misinformation" to trick your vision system. In this case, we're using it as a benefit. (I'll cover some examples below.)

If you illuminate with RGB light, it can mess up colors and illustrate the holes in the color information. Although the light can look white, the wavelengths needed to reflect the color of objects may be missing or limited, so objects can look miscolored or dark. That's why the color rendering index was created for light bulbs, as @username_4 mentioned in a comment. [This video](https://www.youtube.com/watch?v=uYbdx4I7STg) linked by @username_5 in a comment does a great job illustrating the difference between true white light and RGB white, and the effects.

**Examples of how external RGB output can manipulate your brain**

Your brain deals with an abstraction of reality. If necessary, it extrapolates what a color combination should look like, even if you have never seen that combination in real life. For example, yellow and blue light combine to produce white, so you can never see the (additive) color yellow-blue in real life. But if you view yellow light in one eye and blue light in the other, you can trick your brain into inventing the color yellow-blue (which looks like a combination of what yellow and blue each look like, not green).

So how can you create white light by combining only red, green, and blue light? You don't. It's an optical illusion. If you provide your eyes with red, green, and blue light, your vision system reacts with the same response as to white light, so your brain interprets it as white.

How can mixing red light and green light produce yellow light? It doesn't, it's another optical illusion. The medium and long wavelength cones are sensitive to ranges of color that straddle the yellow wavelength. Yellow light triggers both kinds of cones, and that ratio of activity is interpreted as having been caused by yellow light. But the raw signal that is being interpretted is that both the medium and long wavelength cones have been stimulated. Instead of yellow light, those two cones can be similarly stimulated by the right combination of red light plus green light. The cones don't know what part of the light spectrum did it, and your vision system interprets it as yellow.

## What makes RGB the "cone code"?

I'll circle back to elaborate on what makes RGB the cone code.

The vision system deciphers color via how the cones respond to it. It is able to discern and differentiate every color in the visible spectrum because every color stimulates a unique pattern of cone responses. It also isn't a mix and match, where the response patterns are unique but"random", and the vision system matches them to a table of colors. As you move across the spectrum, the cone output patterns follow smooth, complex curves that the vision system is designed to interpret.

Colors that are close to each other on the spectrum produce output patterns that are similar, and the perceived colors look similar. The spectrum looks like a rainbow because as you move across the wavelengths, the color we perceive follows the pattern, with one color blending smoothly into the next to form a continuum of hues.

The vision system cares only about the net output of each cone, it doesn't care how the cones got stimulated to produce that output. Intense light of a wavelength near the tail of the sensitivity distribution can stimulate the cone to the same output as weak light of a wavelength near it's peak sensitivity.

This was adequate during evolutionary times because everything was illuminated by broad-spectrum light (the sun, fire, etc.). The vision system could assume that the cones were all responding to the same distribution of light wavelengths. It only needed to compare the cones to each other to interpret the output.

With modern technology, we can fool the vision system to perceive colors by artificially stimulating the cones with the right wavelengths and intensities on other parts of their sensitivity curves to produce the same output pattern.

The problem is that for most of the spectrum, two or three kinds of cones will be stimulated by whatever wavelength you use. For example, when using a combination that includes reddish light and greenish light, the reddish light will stimulate both the M and L cones to some extent, and the greenish light will also stimulate both the M and L cones to some extent.

The output of each cone reflects its total stimulation. It becomes a puzzle to pick the right combination of wavelengths and intensities so the net stimulation of each cone matches its response for the intended color.

For most of the spectrum, you could find multiple combinations of wavelength and intensity to evoke a particular color. But what if you want to evoke all possible colors using the smallest number of triggering wavelengths, varying only their intensity (i.e., primary colors)? One requirement is that you would need to use a set of wavelengths that allows each type of cone to have the strongest response on at least one.

Looking at the sensitivity curves, that would require at least a wavelength in the blue range for the S cone, a wavelength in the greenish range for the M cone, and a wavelength in the reddish range for the L cone.

But that's not sufficient, there are requirements for the response patterns of each cone compared to the others. Varying only the intensity of each fixed, component wavelength needs to produce a cumulative response matching not just a single color, but all of the patterns for the spectrum. The results also need to be a continuous progression of color as you increment the intensity of a component wavelength.

That's a lot of complex requirements and constraints. But there happen to be "Goldilocks" spots in those three color ranges that allow you to use just three wavelengths to simulate most of the spectrum.

Because each selected wavelength needs to influence multiple cones for this scheme to work, the selected wavelengths can't be at the extremes of the visible spectrum, where a single type of cone is responsive. The bluest blue this can evoke is the selected blueish wavelength at 100% intensity, and the reddist red it can evoke is the selected reddish wavelength at 100% intensity; this trick can't evoke colors farther out on the spectrum. Thus, the gamut of RGB primary colors can't include the entire visible spectrum.

## CMY

Since RGB models how our brains process additive color, CMY (the color space), is an extrapolation of it for subtractive color. It just works in reverse using the RGB primary colors (note that CMYK is a different conversion).

[![enter image description here](https://i.sstatic.net/fO18n.png)](https://i.sstatic.net/fO18n.png)

In this chart, "nothing" is the absence of color being contributed. On an RGB device, "nothing" would appear as the background color of the device, which might not be pure black. On a CMY application, "nothing" would be the background color of the media, which might not be pure white.

Theoretically, every color in one model can be expressed in the other; one is just the inverse of the other. In real life, colors created from CMY primary colors are often muddy, not like the equivalent RGB color that the model suggests. The model isn't wrong.

The problem is with how the colors are implemented. There are issues like the colors being created by mixing pigments, or colorants that aren't a pure color, so you don't get pure subtractive color. When CMY colors are created, the conversion is much more complex than the chart above describes because of the need to compensate for real life considerations like available colorants and how they behave. But that's a subject for another question.

> **Comments:**
> **username_4**: That's a nice, and comprehensive, answer, so I don't suggest adding this, but the complexity is hinted at by light sources with narrow emission bands (e.g. sodium street lights and non-white LEDs) especially in combination with materials that have narrow transmission or reflection bands (some pigments/dyes, both natural and synthetic). This leads to the concept of the colour rendering index for lights  
> **username_5**: [This youtube video](https://www.youtube.com/watch?v=uYbdx4I7STg) does a great job illustrating the difference between true white light and RGB white.  
> **username_6**: _"Every color in the visible spectrum stimulates either two or three kinds of cones to some extent"_ — at the ends of the visible spectrum we mostly get stimulation of one kind of cones. In particular, at 400 nm the ratio of sensitivities (normalized to peaks) of S to M cones is about 25, while at 800 nm similar ratio of L to M is about 11. (Numbers taken from 2° LMS fundamentals available [here](http://www.cvrl.org/ciepr.htm)).  
> **username_7**: I think this may be simplifying it too much, "Red, green, and blue are the color components that your vision system uses to encode color information;" The way our vision system encodes color information is a bit complicated and I don't understand it very well, but we start with the LMS signals from the different cones and produce different signals (opponent or complementary, or something else) derived from those, and I don't think at any point we can really say that the signal is encoded as "RGB".  
> **username_8**: _"...Red, green, and blue are the color components that your vision system uses to encode color information;..."_ - that's not quite true.  Your vision system is all about converting the relative intensities from the S, M and L cones into something we see as a "colour".  Encoding into RGB isn't part of that process.  The only reason why computer screens, TVs, cameras and so on use RGB is because it's a system that lets you encode a large subset of the colours that we can actually see.  The RGB space is not actually a property of the human vision system at all.  
> **username_9**: just fyi A helpful resource going all the way from basic theory to the practicalities of color in manufacturing (which may be particularly suitable here in Crafts SE) is [Billmeyer and Saltzman's Principles of Color Technology, 4th Edition](https://www.wiley.com/en-us/Billmeyer+and+Saltzman%27s+Principles+of+Color+Technology%2C+4th+Edition-p-9781119366683)  
> **username_0**: @username_8, I've been wrestling with how to better word that.  The SML cone output is translated into red, green, blue color space for us to experience color.  RGB in electronics output works because it uses the primary colors and rules that match how our vision system works.  I'll see if I can make that a more accurate description.  Thanks.  
> **username_8**: I don't feel that last comment is quite right either, @username_0.  There are actually lots of visible colours that are outside the gamut of RGB.  I'll try to write my own answer if I have time.  
> **username_10**: @username_8 that's because RGB describes a triangle, but our color perception is not perfectly triangular, plus physically realizable RGB primaries don't get all the way to the edges.  See the [CIE color diagram](https://en.wikipedia.org/wiki/CIE_1931_color_space#CIE_xy_chromaticity_diagram_and_the_CIE_xyY_color_space).  
> **username_8**: Yes, I know.  I don't think an answer to this question can be considered complete, without mention of the CIE colour diagram.  @username_10  
> **username_11**: There is one thing missing here though touched upon lightly. In the visible spectrum there is no such color as white. White does not exist. Instead the color of light form the sun contains almost all the frequencies in the visible spectrum almost at their maximum values. We have evolved to see sunlight as a neutral color - "white". This makes sense since this is the color that a white (or silver) surface reflects - all of them (white just means it absorbs none of the wavelength). So if you max R G and B it simulates sunlight by transmitting all of the colors.  
> **username_6**: @username_11 reflective colors and definition of "white" is another can of worms, where chromatic adaptation comes in. Touching this would expand this answer quite a bit, into a mostly irrelevant direction.  

---

### Answer by username_12 on 2022-04-07. Score: 12

I'm the author of this image that was used in the top-voted answer:

![](https://i.sstatic.net/2KPHj.png)

~~and I do not endorse that answer.~~ (It's been edited, and I haven't looked at the edit yet.)

I made that image to disabuse people of the misconception that we see RGB. People commonly say that the three types of cone "detect red, green, and blue light", and you can see in the image that that isn't true at all. The other answer acknowledges that discrepancy, but saves the misconception by modifying it slightly into a form where postprocessing in the brain turns the cone responses into RGB. That's still wrong. *RGB is not the internal color space of the brain*.

(That should be obvious, because which RGB would it be? There are many sets of additive primaries called "RGB", including CIE RGB, Adobe RGB, Rec.601, sRGB, and Rec.2020. Today, sRGB dominates, but that's for reasons of engineering and interoperability, not because it matches the brain's internal color space more closely than the others.)

---

It's true that there is a three-dimensional space of psychological colors, because there are three cone types. It's also true that the brain transforms the cone outputs into a different "coordinate system". But it isn't RGB. The internal color axes seem to be dark/light, red/green, and blue/yellow, as explained in Wikipedia's article on the [opponent process](https://en.wikipedia.org/wiki/Opponent_process). Here's a picture of the opponent colors from that article:

![](https://upload.wikimedia.org/wikipedia/commons/thumb/7/71/Opponent_colors.svg/320px-Opponent_colors.svg.png)

Note that there are four opponent hues, not three, and the three that most closely match the sRGB primaries don't actually match them very closely. The opponent-process blue is essentially sky blue, but the B of sRGB is quite violet, as you can see in this image where a rectangle of it is superimposed on a photograph of the sky:

![](https://i.sstatic.net/z9vsg.png)

The name RGV was sometimes used historically instead of RGB for three-primary additive systems.

---

So where do RGB and CMY come from?

First of all, you need at least three primaries to get good color, because with two primaries, you only have two parameters (the quantity of each one) and so you can't cover more than a two-dimensional subspace of the three-dimensional space of psychological colors.

With three primaries, you still can't cover the whole space, but you can cover a three-dimensional subspace at least. If the primaries are well spaced around the color wheel, then you can produce every hue. If they're saturated (far from the dark/light axis), then you can produce fairly well saturated hues.

Beyond that, it comes down to practical engineering issues: some pigments and phosphors are (or were) cheaper to manufacture than others. When you optimize subject to all of these constraints, you end up with red-green-violet(blue) for lights, or red-yellow-blue for pigments. The historical red-yellow-blue systems evolved into the CMY systems used in printing today. Here's a side-by-side comparison of the primaries from Moses Harris's "prismatic color wheel", drawn circa 1785, and an extreme close-up of CMY dots on newsprint:

![](https://i.sstatic.net/TVf9H.jpg)

More primaries are better. You can't reproduce every color with three. That's especially true of paints/inks, which are far more complicated than emissive displays like TVs, because the mixing behavior is nonlinear, and the appearance of the result depends also on the illuminant. Three colors is just the minimum that gets you acceptable results.

---

> Red, green, and blue are the only (additive) colors that cannot be created by mixing other colors. What makes them primary colors, or even unique?

Nothing. You can make them by mixing other primaries, if you choose other primaries.

> * The RGB model says red light plus green light produces yellow light. Each color has its own wavelength. How can combining two wavelengths produce a third, all in the same wavelength ballpark?
> * White light is a collection of all the wavelengths of visible light. Red, green, and blue light are just three wavelengths. How can just red, green, and blue create all the other wavelengths in white light?

The primaries in RGB systems aren't wavelengths. Color vision has nothing to do with spectral/rainbow colors. (This is another common misconception, which often manifests as people claiming that magenta is "not a real color".) Color vision evolved for other reasons, and the appearance of the spectrum is an evolutionary accident. Yellow is between red and green in the 3D cone space, and also in the spectrum. Violet is between red and blue in the 3D cone space, but not in the spectrum. That doesn't mean anything. The spectral colors doesn't matter.

Here are the wavelength spectra of primaries from particular CRT, AMOLED, and LED-backlit LCD displays:

![](https://upload.wikimedia.org/wikipedia/commons/thumb/2/29/CRT_phosphors.png/360px-CRT_phosphors.png)
![](https://www.researchgate.net/profile/Aaron-Quigley-4/publication/319440880/figure/fig4/AS:614169539788816@1523440837705/Measured-screen-emission-spectral-for-Galaxy-S6-AMOLED-and-Nexus-5-LCD-The-line.png)

None of these violate the sRGB standard, as long as they result in the same tristimulus values (up to overall brightness). This is something that username_0's answer basically gets right, except that it's couched in the idea that RGB is the brain's internal color space, which is wrong. What matters is only that the internal color space is three dimensional, while wavelength space has a much higher dimension (theoretically infinite), and as a result you have a huge freedom in choosing wavelength spectra that will map down to the same 3D point.

> So how can you create white light by combining only red, green, and blue light? You don't. It's an optical illusion.

This is just wrong, unless you specifically define white to be the spectrum of sunlight. Even then, you could engineer a sRGB-compliant display whose primaries added to a close approximation of sunlight when displaying white, if there were any reason to do that. You can see from the graphs above that the output of real displays when displaying white is actually a pretty broad spectrum. The (AMO)LED display has the narrowest peaks, unsurprisingly, but even those are pretty broad.

A big part of the problem is that the same words that describe psychological colors are also used to refer to spectral frequencies. "Combining only red, green, and blue light" sounds like a spectrum with three sharp spikes, but it's not. The word "only" shouldn't be there; there's no "only" about it.

> Since RGB is how our brains process additive color, CMY is an extrapolation of it for subtractive color. It just works in reverse using the RGB primary colors. [...]

The theory of mixing pigments is much more complicated than the theory of mixing lights. Even in the simplest model, the absorptive effect of different pigments doesn't subtract, but multiplies (or adds logarithmically). As a result the perceived color depends nonlinearly on the amount of each pigment, in a way that can't be modeled by tristimulus values. It also depends on the illuminant, which is a complication that doesn't exist in emissive color (though ambient lighting conditions do affect how colors from emissive displays are perceived).

So it is not at all true that CMY is the opposite of RGB. This is another weirdly common misconception. If you do a web search for "RGB CMYK conversion" or words to that effect, you'll find innumerable sites that literally just compute K = 255 - max(R,G,B), C = 255 - K - R, etc. I'm amazed that anyone really believes that CMYK is that simple: if it were, why even bother to define a separate standard? You could just compute 255-R in the printer.

> **Comments:**
> **username_13**: Thank you so much for posting this, it clears up a lot.  
> **username_0**: Thanks for this answer.  I'll just post some thoughts. We can discuss in chat if you want. Key points: 1)My original writeup did incorrectly describe RGB as the internal color space. That's been corrected. What's described now is how RGB acts like a cone code to evoke colors. 2)We still don't know the internal color system for sure. The opponent process has fallen out of favor because of certain inadequacies. (cont'd)  
> **username_0**: 3)For the purpose of creating color in the real world, there are various versions of RGB, and added primaries for a better gamut, various CMY variants, including added primaries, use of alternative primary combinations as long as they can produce the desired color subset, adjustments for pigments, etc.  From a basic color theory perspective, what is typically used to describe the visible color space (to the extent it can, as generically close as possible to vision, with 3 primaries that add up to white or black), is RGB for additive color and CMY for subtractive color. (cont'd)  
> **username_0**: Are you saying there is no basis for that; if people had understood color better, there might be a different combination being taught? Is RGB the primaries in emissive displays only for a reason like it happens to be cheap to make those colors? 4)"The primaries in RGB systems aren't wavelengths. Color vision has nothing to do with spectral/rainbow colors." The gamut perimeter is defined in terms of wavelengths, and the corners of the triangle have to be defined. Color vision is based on how light wavelengths trigger cones, and RGB display colors need to be precise wavelengths.  (cont'd)  
> **username_0**: Having a tough time on this one. 5)'"Combining only red, green, and blue light" sounds like a spectrum with three sharp spikes, but it's not.' In practice, emissive displays aren't narrow peaks.  But my understanding is they could be, and they would still fool the cones and produce a similar result. 6)CMYK is a different conversion than CMY, but the theoretical conversion for CMY actually is as simple as 255-R. That's not adequate in the real world, like for printers, because printers don't use perfect colors or processes.  
> **username_13**: I am clearly not as informed as @username_12, my my takes are: 3. RBG is chosen because it has a very big gamut. The reason to use sRGB instead of a bigger/better RGB space is cost of materials.  4. Primaries in RGB are defined in Cie XYZ, which has three parameters and represents perceived color, not wavelength which is a single parameter. You could in theory have magenta as a primary color.  
> **username_6**: _"but the B of sRGB is quite violet, as you can see in this image "_ — but the rectangle in the image is not sRGB blue, or something has gone wrong with my browser which shows it as `#444488`.  

---

### Answer by username_13 on 2022-04-07. Score: 6

As a follow up to fixer's answer, there's no specific wavelength of R, G, and B that have to be used. They are chosen to get the largest possible range of what we can see.

Also, as pointed out by username_12, the R G B values are not wavelengths but colors. Two spectrum that produce the same color would be equally valid (ignoring the effects on reflections and refractions)

If you pick specific values for Red, Green, and Blue you define an Absolute color space <https://en.wikipedia.org/wiki/Color_space#Absolute_color_space>

If you look at this chart of various RGB color spaces there's quite a few choices. <https://en.wikipedia.org/wiki/RGB_color_spaces>

It should also be possible to intuitively see why a triangle made of different colors than Red, Green, and Blue would be inefficient and leave out colors that we can see.

[![different RGB color spaces](https://i.sstatic.net/drNRy.png)](https://i.sstatic.net/drNRy.png)

Note that even the bigger RGB color spaces do not capture everything.

> **Comments:**
> **username_0**: Thanks for adding this to the discussion.  One question for clarification. re: "there's no specific wavelength of R, G, and B that have to be used. They are chosen to get the largest possible range of what we can see...the exact RGB values have bounced around quite a bit" - can you distinguish between "internal" and "external"? Vision is based on physiological characteristics that don't change, so there must be precise primary colors for that system for interpretting light input. People have played with defining the corner points to create the biggest gamut that a RGB color space can describe.  
> **username_13**: I'm not totally sure what you mean by Internal vs External. Primary colors are just a a limited set of colors that can be mixed to produce all others. In theory, a D65 white in SRGB would look the same as the white in Adobe RGB even though they are a different mix of different wavelengths  
> **username_14**: @username_0 There are actually no three primary colors that would create all colors from the visible spectrum just by simple addition - any choice would need negative components for some colors. See https://www.feynmanlectures.caltech.edu/I_35.html  
> **username_0**: I guess the distinction is "produce" vs "interpret" (primary colors aren't just for production). The vision system interprets incoming light in a way fixed by phisiology, based on some primary colors defined by the vision system. People also produce colors using an RGB color space, and have experimented with the points of the triangle to maximize that gamut. RGB isn't a perfect explanation of how vision works.  But to the extent that it is, the primary colors it uses don't change. Internal vs external referred to how your body interprets color internally vs how you create colors externally.  
> **username_10**: @username_0 There are no primary colors defined by our vision, only approximations.  If you pick any 3 colors, you can mix them to get any of the colors inside their triangle but you can't get anything outside the triangle.  And if you pick primaries that are outside the visible range, like ProPhoto, you can't make a device to display them because those primaries are invisible and won't generate any reaction in your eyes at all.  
> **username_0**: @username_10, I'm approaching this from the vision side rather than the color creation side.  Are you saying that the triggering wavelengths for the cones, at which RGB evokes the intended colors, does not imply an origin color space for the needed RGB values, with fixed underlying primaries? Or, the primaries for such a space do not have to be fixed (any variation on RGB will work but the perceived color might not be consistent)? Or, we can only estimate/approximate what those points must be? Or something else?  
> **username_10**: @username_0 I'm saying that no matter which 3 primaries you pick, there are colors you can see that can't be generated by any combination of those primaries. You can use the CIE diagram to predict what those colors will be.  
> **username_0**: @username_13, I'm not sure how much this comment thread would be of value to others.  If you think it just distracts from your answer, I can move them to chat.  Just upvote this comment if you want me to.  
> **username_13**: Fine either way. And like Mark said, there is several color spaces that map the entire perceptive color space, Cie XYZ and LMS. You could even define every color in any given absolute RGB color space too, but it will anything with negative numbers isn't producible by a real world display.  

---

