RGB : Java Glossary

RGB
RGB (Red Green Blue). The colour-describing scheme most commonly used in Java and HTML (Hypertext Markup Language). The alternative is HSB (Hue Saturation Brightness).

When you mix paints, the primary colours are red, yellow and blue, but when you mix beams of light, (as on a CRT (Cathode Ray Tube) screen), the primary colours are red, green and blue. The primaries differ because every extra pigment subtracts from the light reflected and every extra beam of light adds to the light projected. The asymmetry is still puzzling. Why is the primary yellow replaced by green, when you switch from pigments to light beams, but red stays invariant?

The rules of how you can simulate non-primary colours (i.e. other frequencies on the visual spectrum) by blending primaries are a function, not of physics, but of biology — how the human vision receptors work. There is thus no requirement for the scheme to be simple or logical, just functional.

There are four kinds of colour receptor in your eye. One set of cones are most sensitive to light at 420 nm (nanometers) (blue-violet), another set to 434 nm (blue), rods at 498 (green), and another set of cones at 564 (yellow-green). (This goes counter to my intuition. I suspect an error either in those frequencies or in the colours shown below for those frequencies. It seems intuitively to me my eyes are most sensitive in the yellow-orange region.) Each is sensitive to other colours (frequencies) as well but it drops off around the most sensitive point in roughly a bell shaped curve. Rods are sensitive to low light intensities. They function primarily for night vision.
wavelength spectrum

Colour vision works by your brain comparing the frequency of firing of the various types of receptor. You can thus fool the brain into thinking it is seeing orange, for example, by showing it a beam of red light at the same time as a beam of green light at 2/3 the intensity. That produces a similar aggregate stimulating effect on the receptors that a beam of pure orange 630 nm light would.

There are colours like brown and purple that don’t appear on the spectrum. They are made of a mixture of true spectral colours. They too can be simulated with mixtures of red, green and blue light.

CMYK
colour
Computer Vision links
HSB
Netscape Colour Chart to sharpen your intuition on how the two schemes work

CMP homejump to top You can get the freshest copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/rgb.html J:\mindprod\jgloss\rgb.html
logo
Please email your , letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email. If you want your message, your name or email kept confidential, not considered for public posting, please explicitly specify that. Unless you state otherwise, I will treat your message as a letter to the editor that I may or may not publish in the feedback section. After that, it will be too late to retract it. If you disagree with something I said, please quote it and cite the web page where you found it, tell me why you think it is wrong, and, if possible, provide some supporting evidence. Threatening to kill me or spouting obscenities has yet to persuade me to change my mind.
mindprod.com IP:[65.110.21.43]
view BlogYour face IP:[38.107.179.214]
You are visitor number 12,916.