The RGB color model is an additive model in which red, green and blue (often used in additive light models) are combined in various ways to reproduce other colors. The name of the model and the abbreviation "RGB" come from the three primary colors, Red, Green and Blue. These three colors should not be confused with the primary pigments of red, blue and yellow, known in the art world as "primary colors".
The RGB color model itself does not define what is meant by "red", "green" and "blue", and the results of mixing them are not exact unless the exact spectral make-up of the red, green and blue primaries are defined. The color model then becomes an absolute color space, such as sRGB or Adobe RGB; see RGB color space for more details. This article discusses concepts common to all the different RGB color spaces that use the RGB color model.
__TOC__
The human eye contains photoreceptor cells called cone cells which normally respond most to yellowish-green (long wavelength or L), bluish-green (medium or M) and bluish-violet (short or S) light (peak wavelengths of 564 nm, 534 nm and 420 nm respectively). The difference in the signals received from the three kinds allows the brain to perceive a wide gamut of different colors, while being most sensitive (overall) to green light and to differences between shades of green.
As an example, suppose that light in the yellow range of wavelengths (approximately 577 nm to 597 nm) enters the eye and strikes the retina. Light of these wavelengths would activate both the medium and long wavelength cones of the retina, but not equally – the long-wavelength cells will respond more (fire more frequently).
The difference in the response can be interpreted by the cells of the brain (if relevant) that the light is yellow (or whatever word in whichever language is appropriate). In this sense, the yellow appearance of objects is simply the result of yellow light from the object entering our eye and stimulating the relevant kinds of cones simultaneously but to different degrees.
To generate optimal color ranges for species other than humans, other primary colors would have to be used. For species with four different color receptors, such as many birds, one would use four primary colors; for species with just two kinds of receptors, such as most mammals, one would use two primaries.
Even for humans, use of the three 'primary' colours is not the most efficient. In theory, three kinds of emitters that matched the response curves of the cones should produce results closer to 'real life' with less wasted energy.
By using an appropriate combination of red, green and blue intensities, many colors can be represented. Typical display adapters in 2003 use up to 24 bits of information for each pixel (commonly known as bits per pixel). This is usually apportioned with 8 bits each for red, green and blue, giving a range of 256 possible values, or intensities, for each hue. With this (non-optimal) system, 16 777 216 (2563 or 224) discrete combinations of hue and intensity can be specified (in practice, very much fewer than that can be reproduced). It is claimed that the human eye can distinguish as many as 10 million discrete hues (this number varies from person to person depending upon the condition of the eye and the age of the person). However, at the resolution of current screens and at a standard viewing distance people cannot distinguish more than a few hundred hues. See Reference.
RGB is a type of component video signal used in the video electronics industry. It consists of three signals—red, green and blue—carried on three separate cables. Extra cables are sometimes needed to carry synchronizing signals. RGB signal formats are often based on modified versions of the RS-170 and RS-343 standards for monochrome video. This type of video signal is widely used in Europe since it is the best quality signal that can be carried on the standard SCART connector. Outside Europe, RGB is not very popular as a video signal format – S-Video takes that spot in most non-European regions. However, almost all computer monitors around the world use RGB.
When written, RGB values in 24 bpp, also known as Truecolor, are commonly specified using three integers between 0 and 255, each representing red, green and blue intensities, in that order. For example:
| yellow (255,255,0) | green (0,255,0) | cyan (0,255,255) | blue (0,0,255) |
| red (255,0,0) | magenta (255,0,255) |
The above definition uses a convention known as full-range RGB. This convention is so often used that some people have come to view it as universal. This can be confusing because color values are also often considered to be in the range 0.0 through 1.0, rather than 0 to 255 (the latter range is used when colours are encoded in eight bits, which encoding permits 256 different values (sometimes written using two hexadecimal characters)). If in doubt, it is best to describe the range over which a color is specified.
Full-range RGB can represent up to two hundred and fifty-five shades of a given hue. (Only pure reds, greens, blues or greys have this full range of shades.)
Typically, RGB for digital video is not full range. Instead, video RGB uses a convention with scaling and offsets such that (16, 16, 16) is black, (235, 235, 235) is white, etc. For example, these scalings and offsets are used for the digital RGB definition in CCIR 601.
There is also a 16 bpp mode (sometimes called HiColor), in which there are either 5 bits per color, called 555 mode, or an extra bit for green (because the eye can distinguish more shades of green than of other colors), called 565 mode.
Some graphics hardware allows the unused byte to be used as an 8-bit paletted overlay. A certain palette entry (often 0 or 255) is designated as being transparent, i.e where the overlay is this value the truecolour image is shown. Otherwise the overlay value is looked up in the palette and used. This allows for GUI elements (such as menus or the mouse cursor) or information to be overlayed over a truecolour image without modifying it. When the overlay needs to be removed, it is simply cleared to the transparent value and the truecolour image is displayed again. This feature was often found on graphics hardware for Unix workstations in the 90s and later on some PC graphics cards (most notably those by Matrox). However, PC graphics cards (and the systems they are used in) now have plentiful memory to use as a backing store and this feature has mostly disappeared.
Colors used in web design are commonly specified using RGB; see web colors for an explanation of how colors are used in HTML and related languages. Initially, the limited color depth of most video hardware led to a limited color palette of 216 RGB colors - defined by the Netscape Color Cube. However, with the predominance of 24-bit displays, the use of the full 16.7 million colors of the HTML RGB color code no longer poses problems for most viewers.
In short, the web safe color palette consists of the 216 combinations of red, green and blue where each color can take one of six values (in hexadecimal): #00, #33, #66, #99, #CC or #FF (based on the 0 to 255 range for each value discussed above). Clearly, 63 = 216. These hexadecimal values = 0, 51, 102, 153, 204, 255 in decimal, which = 0%, 20%, 40%, 60%, 80%, 100% in terms of intensity. This seems fine for splitting up 216 colors into a cube of dimension 6. However, lacking gamma correction, the perceived intensity on a standard 2.5 gamma CRT / LCD is only: 0%, 2%, 10%, 28%, 57%, 100%. See the actual web safe color palette for a visual confirmation that the majority of the colors produced are very dark, or see Xona.com Color List for a side by side comparison of proper colors next to their equivalent lacking proper gamma correction.
The RGB color model for HTML was formally adopted as an Internet standard in HTML 3.2, however it had been in use for some time before that.
RGB | RGB-farver | RGB-Farbraum | Modelo de color RGB | Rouge vert bleu | RGB-kleursysteem | RGB | RGB | RGB | RGB | RGB | ระบบสี RGB | RGB renk modeli | Mô hình màu RGB | 三原色光模式 | RGB
This article is licensed under the GNU Free Documentation License.
It uses material from the
"RGB color model".
Home Page • arts • business • computers • games • health • hospitals • home • kids & teens • news • physicians • recreation• reference • regional • science • shopping • society • sports • world