RGB

Wikimedia duplicated page From Wikipedia, the free encyclopedia

RGB
Remove ads

RGB, also called additive color mixing, is a color coding using light, with red, green, and blue. These three are mixed with different levels of brightness to create different colors. For example, to obtain white, they are blended with equal intensity for each. For black, no colour receives any intensity.

Thumb
Additive colour mixing: adding red to green yields yellow; adding yellow to blue yields white.
Remove ads

Representations

There are several ways of representing RGB colors, which are used in different situations and purposes. In general, each RGB color consists of red, green and blue light, each of which shines with some intensity; the higher the intensity of (for example) green light, the more 'green' the overall color will seem.

In some digital systems each of red, green and blue has 256 different intensities, from being completely turned off (level 0) to being completely turned on (level 255). The three intensities together are usually listed on their own to then represent the overall color. When the numbers are not annotated with the color they each represent, the first number represents the intensity of red, the second number that of green, and the third number that of blue.

There are usually different ways of writing these lists, for example when creating websites. The most common way uses hexadecimal code, in which the numbers ranging from 0 to 255 can be represented using 2 digits. This only needs six hexadecimal digits (which may be the numbers 0-9 or the letters A-F) to represent RGB colors. When using hexadecimal code, these digits are preceded with a '#' character. See the Examples section below.

An alternative way is to write the numbers in the conventional denary way, then usually enclosed in parentheses with the label 'RGB' to indicate what the numbers stand for. Within computer storage, the three numbers are just stored as binary numbers, much like any other data, though the binary representation is not usually used by humans directly.

Remove ads

Examples

The below table shows a few examples of how RGB is used to blend different colours.

More information Colour, Colour Description ...
Remove ads
Loading related searches...

Wikiwand - on

Seamless Wikipedia browsing. On steroids.

Remove ads