RGB: red, green, and blue

This is the scheme that you will use most often when you are dealing with colors on a computer monitor—in graphics packages, in programming, or in Web pages. RGB describes colored light which is viewed coming from its source (colored light bulbs in a theater, the colors of a video display, or reflection from a white object). It is called an additive color system, since you add light from the primary colors to make new colors.

The values for red, green, and blue may be specified in percent (0–100); this scale is useful for conversion from the CMYK model (following). However, it is more common to use a scale from 0–255 (decimal) or 00–FF (hex)—where 255 or FF = 100%. All modern video cards, which are capable of 16M colors, use one byte each (per pixel) for the R, G, and B values, so the 0–255 and 00–FF scales are more useful in this context. Remember: higher numbers mean more of each color of light. More is lighter, less is darker! You can test the effects of mixing R, G, and B yourself, using our Color Tutor application.

You might still find a book or web site that recommends using “web safe” RGB colors, which are selected from a limited palette of 216 values. That was a good idea in the mid-1990s; with modern hardware, it’s no longer relevant.

RGB color diagram, description follows

Primary colors:

red, green, blue

Secondary colors:

yellow = red + green,
cyan = green + blue,
magenta = blue + red

All colors:

white = red + green + blue (#FFFFFF)
black = no light (#000000)

Mixing colors

There are hundreds, probably thousands, of applications and Web sites that permit you to select colors to use on a Web page. However, learning the RGB system will give a developer much more control over the results than randomly clicking on whatever looks good.

We now offer a “Color Tutor” Java application that will let you experiment with how both the HSB and RGB systems work, as well as determining the contrast between colors. Please see the Tutor page or follow the Tutor link at left.