RGB Color

RGB (Red, Green, Blue) is a way of describing color. Each color is described by a set of three numbers. For example, (102, 51, 255) describes THIS COLOR.

The color’s RGB value, written (n, n, n), describes the intensity of the red, green, and blue channels that make up that color. The range of values for each channel depends on the channel’s bit-depth, or how many bits are used for each channel.

Bit Depth Range
8 bit 0 – 255
16 bit 0 – 32768
32 bit 0.000 – 1.000

For example, in an 8-bit RGB each channel can have a value from 0 to 255. Zero means no brightness for that channel, 255 means maximum brightness. 8 bit RGB colors can range from (0, 0, 0) to (255, 255, 255) and every combination in between, or 2563 = 16,777,216 different colors.
Note that a 32 bit RGB should have an integer range between 0 and 232-1 or 4,294,967,295. However, this is normalized to a decimal value between 0.000 and 1.000.

Click on image to enlarge
Click on image to enlarge.

This is the color chart. It will be our guide to black and white conversion. The color chart will show us how a conversion method affects different colors.

Red Square

Each colored box shows its RGB value. For example, the RED box has an RGB value of (255, 0, 0).

The other colors on the chart are cyan, magenta, and yellow. Expand the chart to see the relationship between the primary colors and the secondary colors.

For example:

RED (255, 0, 0) vs CYAN (0, 255, 255)

Notice how Cyan has the opposite channel values as Red. The same goes for the other colors:

GREEN (0, 255, 0) vs MAGENTA (255, 0, 255)

BLUE (0, 0, 255) vs YELLOW (255, 255, 0)

Red, green and blue are known as the “primary additive colors”. All other colors are some combination of these three primary colors. For example:

RED (255, 0, 0) + BLUE (0, 0, 255) =  MAGENTA (255, 0, 255)

Black & White in RGB

Return to top of page.

In RGB, shades of gray are colors in which all three channels have the same value.

Black (0,0,0)
Gray (80, 80, 80)
Gray (160, 160, 160)
White (255, 255, 255)

The following chart shows the shades of gray from (7, 7, 7) at the lower right to (255, 255, 255) at the top left. The black frame is (0, 0, 0).

Since the three channels have the same value, a black and white image in RGB can have at most 256 shades of gray.

To create a black and white image we take a color image with over 16 million potential colors and convert it into an image with only 256 shades of gray. How you convert those colors can lead to very different results.


Related Links

3 thoughts on “RGB Color”

Leave a Reply

Your email address will not be published. Required fields are marked *