New Immissions/Updates:
boundless - educate - edutalab - empatico - es-ebooks - es16 - fr16 - fsfiles - hesperian - solidaria - wikipediaforschools
- wikipediaforschoolses - wikipediaforschoolsfr - wikipediaforschoolspt - worldmap -

See also: Liber Liber - Libro Parlato - Liber Musica  - Manuzio -  Liber Liber ISO Files - Alphabetical Order - Multivolume ZIP Complete Archive - PDF Files - OGG Music Files -

PROJECT GUTENBERG HTML: Volume I - Volume II - Volume III - Volume IV - Volume V - Volume VI - Volume VII - Volume VIII - Volume IX

Ascolta ""Volevo solo fare un audiolibro"" su Spreaker.
CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
RGB color model - Wikipedia, the free encyclopedia

RGB color model

From Wikipedia, the free encyclopedia

The RGB color model mapped to a cube (with cut-away shown)
The RGB color model mapped to a cube (with cut-away shown)
A representation of additive color mixing
A representation of additive color mixing

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 spaces for more details. This article discusses concepts common to all the different RGB color spaces that use the RGB color model.

Contents


An RGB image, along with its separate R, G and B components; Note that the white snow consists of strong red, green and blue; the brown barn is composed of strong red and green with little blue; the dark green grass consists of strong green with little red or blue; and the light blue sky is composed of strong blue and moderately strong red and green.
An RGB image, along with its separate R, G and B components; Note that the white snow consists of strong red, green and blue; the brown barn is composed of strong red and green with little blue; the dark green grass consists of strong green with little red or blue; and the light blue sky is composed of strong blue and moderately strong red and green.

[edit] Biological relevance of primary colors

The choice of 'primary' colors was probably derived from human biology because they are stimuli that maximised the difference between the physiological responses of the cone cells of the human retina to light.

The normal three kinds of light-sensitive photoreceptor cells in the human eye (cone cells) 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 differentiate 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 detected by the brain and associated with the concept that the light is 'yellow'. 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’ colors 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.

[edit] RGB and displays

One common application of the RGB color model is the display of colors on a cathode ray tube, liquid crystal display or plasma display, such as a television or a computer’s monitor. Each pixel on the screen can be represented in the computer or interface hardware (for example, a ‘graphics card’) as values for red, green and blue. These values are converted into intensities which are then used for display.

By using an appropriate combination of red, green and blue intensities, many colors can be represented. Typical display adapters in 2007 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.

[edit] Video electronics

Analog video standards

RF connector - Composite video - S-Video (Y/C) - Component video (YPbPr) - RGB

RGB pixels in an LCD TV (on the right - an orange and a blue colour, on the left - a close up of pixels)
RGB pixels in an LCD TV (on the right - an orange and a blue colour, on the left - a close up of pixels)

RGB is a type of component video signal used in the video electronics industry, not to be confused with component video the current analog connectivity solution found on most HD consumer electronics, (the cable with three RCA jacks on each end labeled YPbPr). It consists of three signals—red, green and blue—carried on three separate cables/pins (SCART has one pin/wire for each of the three colors, no other standard has such in the U.S. to carry RGB as does SCART). 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.

Please note: the term 'component video' has effectively been hijacked by the makers of modern consumer electronics to refer only to YPbPr component video. Hence, in everyday use, the phrase 'component video' has come to be a convenient term used to refer to the less easily memorized YPbPr (referring to the red, green and blue color-coded video sockets on the back of a DVD player or modern TV). The original meaning referred to separating a single signal into more than one. S-Video, RGB and YPbPr signals comprise two or more separate signals: hence, all are 'component video' signals by definition.

[edit] Non-linearity

The intensity of the color output on computer display devices is normally not directly proportional to the R, G and B values. That is, even though a value of 0.5 is very close to halfway between 0 and 1.0 (full intensity), the light intensity of a computer display device when displaying (0.5, 0.5, 0.5) is normally (on a standard 2.5 gamma CRT / LCD) only 18% of that when displaying (1.0, 1.0, 1.0), instead of at 50%[1]. See gamma correction for more background on this issue.

[edit] Professional color calibration

Proper reproduction of colors in professional environments requires extensive color calibration of all the devices involved in the production process. This results in several transparent conversions between device-dependent color spaces during a typical production cycle in order to ensure color consistency throughout the process. Along with the creative processing, all such interventions on digital images inherently damage it by reducing its gamut. Therefore the denser the gamut of the original digitized image, the more processing it can support without visible degradation. Professional devices and software tools allow for 48 bpp (bits per pixel) images to be manipulated (16 bits per channel) in order to increase the density of the gamut.

[edit] Representations

[edit] Numeric representations

A color in the RGB color model can be described by indicating how much of each of the red, green and blue color is included. Each can vary between the minimum (no color) and maximum (full intensity). If all the colors are at minimum the result is black. If all the colors at maximum, the result is white. A confusing aspect of the RGB color model is that these colors may be written in several different ways.

  • Color science talks about colors in the range 0.0 (minimum) to 1.0 (maximum). Most color formulae take these values. For instance, full intensity red is 1.0, 0.0, 0.0.
  • The color values may be written as percentages, from 0% (minimum) to 100% (maximum). To convert from the range 0.0 to 1.0, see percentage. Full intensity red is 100%, 0%, 0%.
  • The color values may be written as numbers in the range 0 to 255, simply by multiplying the range 0.0 to 1.0 by 255. This is commonly found in computer science, where programmers have found it convenient to store each color value in one 8-bit byte. This convention has become so widespread that many writers now consider the range 0 to 255 authoritative and do not give a context for their values. Full intensity red is 255,0,0.
  • The same range, 0 to 255, is sometimes written in hexadecimal, sometimes with a prefix (e.g. #). Because hexadecimal numbers in this range can be written with a fixed two digit format, the full intensity red #ff, #00, #00 might be contracted to #ff0000. This convention is used in web colors and is also considered by some writers to be authoritative.

[edit] 24-bit representation

Color depth

8-bit color
15/16 bit: Highcolor
24/32 bit: Truecolor
Web-safe color

Related

RGB color model
Palette

Main article: Truecolor

When written, RGB values in 24 bits per pixel (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)
red
(255,0,0)
 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 colors 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.

[edit] Memory space

The amount of memory space used by an uncompressed image is specified by the number of pixels in the image and the colour depth to which each pixel is specified. In a 24-bit image, each pixel is specified by a 24-bit allocation of memory, so the amount of space required in bits is 24 x the number of pixels. To calculate the memory required in bytes, the resulting number should be divided by 8 (8 bits in a byte).

E.g. A 24-bit image 640 x 480 pixels in size

24 x 640 x 480 = 7,372,800 bits

7,372,800 / 8 = 921,600 bytes

[edit] 16-bit mode

Main article: Highcolour

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.

[edit] 32-bit mode

The so-called 32 bpp mode is almost always identical in precision to the 24 bpp mode; there are still only eight bits per component, and the eight extra bits are often not used at all. The reason for the existence of the 32 bpp mode is the higher speed at which most modern hardware can access data that is aligned to byte addresses evenly divisible by a power of two, compared to data not so aligned.

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.

[edit] 48-bit mode (sometimes also called 16-bit mode)

"16-bit mode" can also refer to 16 bit per component, resulting in 48 bpp. This modes makes it possible to represent 65536 tones of each color component instead of 256. This is primarily used in professional image editing, like Adobe Photoshop for maintaining greater precision when a sequence of more than one image filtering algorithms is used on the image. With only 8 bit per component, rounding errors tend to accumulate with each filtering algorithm that is employed, distorting the end result.

[edit] RGBA

With the need for compositing images came a variant of RGB which includes an extra 8 bit channel for transparency, thus resulting in a 32 bpp format. The transparency channel is commonly known as the alpha channel, so the format is named RGBA. Note that since it does not change anything in the RGB model, RGBA is not a distinct color model, it is only a file format which integrates transparency information along with the color information in the same file. This allows for alpha blending of the image over another, and is a feature of the PNG format. (Note: RGBA is not the only method to have transparency in graphics. See Transparency (graphic) for alternatives).

Also, digital cameras that use a CMOS sensor often operate with the RGB system; the sensor can have a grid of red, green, and blue detectors arranged so that the first row is RGRGRGRG and the next is GBGBGBGB and so on. Green is given more detectors than red and blue in order to better approximate the sensitivity of the eye. This is commonly known as a Bayer filter.

[edit] Colors in web-page design

Main article: Web colors

Colors used in web-page 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.

[edit] History of RGB color model

The use of the RGB color model as the standard for presentation of color on the Internet has its roots in the 1953 RCA color-TV standards and in Edwin Land's use of an RGB standard in the Land / Polaroid camera.

[edit] Reference

  • Fundamental requirements for picture presentation, Cowlishaw, M. F., Proc. Society for Information Display, Volume 26, No. 2 (1985)

[edit] See also


Static Wikipedia (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2007 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2006 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu

Static Wikipedia February 2008 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu