RGB and displays


Cutaway rendering of a color CRT: 1. Electron guns 2. Electron beams 3. Focusing coils 4. Deflection coils 5. Anode connection 6. Mask for separating beams for red, green, and blue part of displayed image 7. Phosphor layer with red, green, and blue zones 8. Close-up of the phosphor-coated inner side of the screen
RGB pixels in an LCD TV (on the right: an orange and a blue color; on the left: a close-up of pixels)
Close-up of red, green, and blue LEDs that form a single pixel in a large scale LED screen.

One common application of the RGB color model is the display of colors on a cathode ray tube (CRT), liquid crystal display (LCD), plasma display, or LED display such as a television, a computer’s monitor, or a large scale screen. Each pixel on the screen is built by driving three small and very close but still separated RGB light sources. At common viewing distance, the separate sources are indistinguishable, which tricks the eye to see a given solid color. All the pixels together arranged in the rectangular screen surface conforms the color image.

During digital image processing each pixel can be represented in the computer memory or interface hardware (for example, a graphics card) as binary values for the red, green, and blue color components. When properly managed, these values are converted into intensities or voltages via gamma correction to correct the inherent nonlinearity of some devices, such that the intended intensities are reproduced on the display.

Video electronics

RGB is also the term referring to 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/pins. 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.

Video framebuffer

A framebuffer is a digital device for computers which stores in the so-called video memory (conformed by an array of Video RAM or similar chips) the digital image to be displayed on the monitor. Driven by software, the CPU or other specialized chips write the appropriate bytes in the video memory to conform the image, which an electronic video generator sends to the monitor. Modern systems encode pixel color values by devoting some bits groupings for each of the RGB separate components. RGB information can be either carried by the pixel bits themselves or in a separate Color Look-Up Table (CLUT) if indexed color graphic modes are used.

By using an appropriate combination of red, green, and blue intensities, many colors can be displayed. Current typical display adapters use up to 24-bits of information for each pixel: 8-bit per component multiplied by three components (see the Digital representations section below). With this system, 16,777,216 (2563 or 224) discrete combinations of R, G and B values are allowed, providing thousands of different (though not necessarily distinguishable) hue, saturation, and lightness shades.

Nonlinearity
Main article: Gamma correction

In classic cathode ray tube (CRT) devices, the brightness of a given point over the phosphorescent screen due to the impact of accelerated electrons is not proportional to the voltage applied to electrons in their RGB electron guns, but to an expansive function of that voltage. The amount of this deviation is known as its gamma value (γ), the argument for a power law function, which closely describes this behaviour. A linear response is given by a gamma value of 1.0, but actual CRT nonlinearities have a gamma value around 2.0 to 2.5.

Similarly, the intensity of the output on TV and computer display devices is not directly proportional to the R, G, and B applied electric signals (or file data values which drive them thru Digital-to-Analog Converters—DAC). On a typical standard 2.2-gamma CRT display, an input intensity RGB value of (0.5, 0.5, 0.5) only outputs about 22% of that when displaying the full (1.0, 1.0, 1.0), instead of at 50%. To obtain the correct response, a gamma correction is used in encoding the image data, and possibly further corrections as part of the color calibration process of the device. Gamma affects black-and-white TV as well as color. In standard color TV, signals are already broadcast in a gamma-compensated fashion by TV stations.

Display technologies different from CRT (as LCD, plasma, LED, etc.) may behave nonlinearly in different ways. When they are intended to display standard TV and video shows, they are built in a such way that they behave in gamma like an older CRT TV monitor. In digital image processing, gamma correction can be applied either by the hardware or by the software packages used.

Other input/output RGB devices may have also nonlinear responses, depending on the technology employed. In any case, nonlinearity (whether gamma-related or not) is not part of the RGB color model in itself, although different standards that use RGB can also specify the gamma value and/or other nonlinear parameters involved.

RGB and cameras
The Bayer arrangement of color filters on the pixel array of an digital image sensor

In color television and video cameras manufactured before the 1990s, the incoming light was separated by prisms and filters into the three RGB primary colors feeding each color into a separate video camera tube (or pickup tube). These tubes are a type of cathode ray tube, not to be confused with that of CRT displays.

With the arriving of commercially viable charge-coupled device (CCD) technology in the 1980s, first the pickup tubes were replaced with this kind of sensors. Later, higher scale integration electronics was applied (mainly by Sony), simplifying and even removing the intermediate opticals, up to a point to reduce the size of video cameras for domestic use until convert them in handy and full camcorders. Current webcams and mobile phones with cameras are the most miniaturized commercial forms of such technology.

Photographic digital cameras that use a CMOS or CCD image sensor often operate with some variation of the RGB model. In a Bayer filter arrangement, green is given twice as many detectors as red and blue (ratio 1:2:1) in order to achieve higher luminance resolution than chrominance resolution. The sensor has a grid of red, green, and blue detectors arranged so that the first row is RGRGRGRG, the next is GBGBGBGB, and that sequence is repeated in subsequent rows. For every channel, missing pixels are obtained by interpolation in the demosaicing process to build up the complete image. Also, other processes used to be applied in order to map the camera RGB measurements into a standard RGB color space as sRGB.

RGB and scanners

In computing, an image scanner is a device that optically scans images (printed text, handwriting, or an object) and converts it to a digital image which is transferred to a computer. Among other formats, flat, drum, and film scanners exist, and most of them support RGB color. They can be considered the successors of early telephotography input devices, which were able to send consecutive scan lines as analog amplitude modulation signals through standard telephonic lines to appropriate receivers; such systems were in use in press since the 1920s to the mid 1990s. Color telephotographs were sent as three separated RGB filtered images consecutively.

Currently available scanners typically use charge-coupled device (CCD) or contact image sensor (CIS) as the image sensor, whereas older drum scanners use a photomultiplier tube as the image sensor. Early color film scanners used a halogen lamp and a three-color filter wheel, so three exposures were needed to scan a single color image. Due to heating problems, the worst of them being the potential destruction of the scanned film, this technology was later replaced by non-heating light sources such as color LEDs.