Every screen you own fakes millions of colours with three tiny lights
Look closely at any television or phone and each pixel is really three separate specks of red, green and blue light. From normal viewing distance your eye blends them into one solid colour. That trick rests on a theory of human vision worked out in the nineteenth century, long before electronics existed.
RGB is an additive system. Shine red, green and blue beams together and their spectra add up; all three at full strength give white, none at all gives black, and equal amounts at lower intensity give grey. Mix just two equally and you get a secondary colour: green and blue make cyan, blue and red make magenta, red and green make yellow. Paint and ink work the opposite way, subtracting light, which is why colour printers rely on a different model, CMYK.
The choice of primaries follows the eye. Our three types of cone cells respond most strongly near 570, 540 and 440 nanometres. Orange light excites the long and medium cones unequally, and the brain reads that imbalance as orange. Thomas Young and Hermann von Helmholtz built the theory of three-part colour vision in the nineteenth century, and James Clerk Maxwell extended it with a colour triangle around 1860. Three primaries cannot reproduce every colour, though, only those inside the triangle they define.
Maxwell himself made the first RGB colour photograph experiments in 1861, combining three filtered exposures projected onto a screen. Sergey Prokudin-Gorsky photographed in three plates between 1909 and 1915. John Logie Baird sent the first RGB colour transmission in 1928 using spinning coloured wheels and broadcast in colour from London in 1938, the same year Werner Flechsig in Germany patented the shadow mask for colour tubes. CBS tried a field-sequential system in 1940 with a colour wheel spinning above 1,200 rpm.
Computers came later. IBM's Color Graphics Adapter offered 16 colours in 1981 and the improved EGA followed in 1984, but RGB only took off with VGA in 1987. One catch persists: RGB values depend on the device, so the same numbers look different on different screens without colour management, which standards such as sRGB and Adobe RGB address.
Source: RGB color model