Screen Colors Color Models and GEGL the New Graphics Library

GIMP's version 2.6 employs three color models: RGB (red, green, blue), grayscale, and indexed.

GIMP uses the RGB colors, or colors of light, as its default. Together, these colors form what is known as the additive color model. It uses the three primary colors—red, green, and blue—to create a color spectrum containing approximately 16.78 million colors. This is called true color because it represents the maximum number of colors that a computer monitor or television screen can display.

Mixing two primary colors in RGB mode will result in the creation of a secondary color, such as yellow, cyan, and magenta. No color (or the absence of light) creates black, while the sum of all colors results in white.

Figure 1.4 Figure 1.5

The RGB color model The color spectrum of the RGB color model.

About 16.78 colors are shown, with black at one extreme and white at the other.

Figure 1.7

There are 256 gray levels in the RGB color model.

Figure 1.6

Approximated representation of the set of colors in the RGB color model

Figure 1.7

There are 256 gray levels in the RGB color model.

If you wish to specify a color for a printer or want to choose a unique background color for your web page, the following information should be considered.

Specific colors correlate to unique numerical values. In the RGB color model, each of the primary colors (red, green, and blue) has a decimal color value ranging from 0 to 255, with black as 0 and white as 255. Hence, there are 256 color values for each of the base colors red, green, and blue. The total number of potentially resulting colors is calculated by the following multiplication:

To specify the number of colors of an image or color model, I use the term color depth, which is specified in bits. The RGB color model has a color depth of 24 bits (24-bits = 2 to the power of 24 colors = 16.78 million colors).

These values apply to color as well as black-and-white images. In the world of digital image editing, black-and-white photographs are called grayscale images. In addition to the black and white "colors", grayscale images contain all possible shades of neutral gray.

Since the color values of the three primary colors must be identical in order to produce purely gray levels, the number of gray "color" values amounts to 256.

Grayscale images have a color depth of 8 bits.

In the RGB color model, the colors are normally defined in decimal numbers. As mentioned earlier, each single color can have a value between 0 and 255. You can use the eyedropper icon located in the Toolbox of GIMP to open the Color Picker to measure a color. The Color Picker will show you the number corresponding to a color's exact value so you can easily transmit the information to your colleagues or work partners.

Color

O

O

O

Red

255

O

O

Green

O

255

O

Blue

O

O

255

Yellow 255

255

O

Cyan

O

255

255

Magenta

255

O

255

Medium gray

128

128

128

White

255

255

255

The primary and secondary (mixed) colors in decimal notation

The primary and secondary (mixed) colors in decimal notation

BASICS

If you want to appropriate a color from an existing image as the background color for a web page, you will need to specify hexadecimal numbers (base 16). Convert the decimal numbers (see above) into hexadecimal numbers, which are simply denoted by adding a # symbol in front of the number. You can use any tool for this conversion, including the Windows Calculator (Start > Programs > Accessories > Calculator > View > Scientific).

GIMP conveniently performs this conversion for you. Its Color Picker tool will provide you with the hexadecimal number value for every color.

Indexed Colors

Many image file formats used on the Internet use indexed colors rather than RGB. Indexed color images don't save the color values in the pixels themselves, but add a defined color palette. The number of colors in this indexed color palette is limited to 256. Indexed images are usually smaller than RGB images since they possess a color depth of 8 bits instead of 24 bits. When an image is converted to indexed color, a predefined color palette or a set of colors derived from the image itself will automatically be formulated. The palette can contain a maximum of 256 colors. File formats that automatically create images with their own color palettes include the compressed GIF format as well as the 8-bit PNG format. Indexed images can also include gray-level images (with a maximum of 256 shades of gray).

However, you may find using an indexed palette cumbersome because it won't allow you to access all of GIMP's editing options. Indexed images are normally edited in RGB mode. After editing, the indexed palette can be selected and attached to the image before saving and exporting the file for use on the Internet.

The CMYK Color Model—Cyan, Magenta, Yellow, Key (Black)

Digital pre-press in four-color printing uses the CMYK color model. The

CMYK model behaves quite differently than the RGB model. For one thing, CMYK has four color channels rather than three like RGB, so the nominal number of colors increases in CMYK. Nevertheless, the color range of CMYK is smaller than RGB. Thus, when you convert an image from RGB to CMYK, it may appear paler or darker due to the loss of image information or the insertion of additional black. To avoid fading or darkening, edit your image in the RGB mode before converting it to CMYK mode. Also, because changes often result when shifting modes, you should avoid converting an image from RGB to CMYK, and vice versa, unless it is necessary.

Since the CMYK color model has four color channels, it possesses a total number of approximately 4.3 billion potential colors, which translates to a color depth of 32 bits.

The colors of this model are subtractive primary colors. This means that the CMYK model behaves inversely to the RGB model. For example, if you apply the RGB model to CMYK, then 256 units of cyan, 256 units of magenta, and 256 units of yellow should produce black. However, what you will actually see is a dirty dark brown. To obtain real gray and black shades, you have to add black. CMYK is actually an initialism for Cyan, Magenta, Yellow, Key, where Key = Black.

Currently, GIMP does not have a feature for converting and editing images directly in CMYK mode. However, it can produce the chromatic components necessary for use in four-color printing processes. If you want to edit in CMYK, you can use the Image > Mode > Decompose menu command to decompose your image into the four color channels. Each of these channels can then be saved, edited, and shared as separate images, which can be re-integrated prior to printing.

Alastair M. Robinson's plug-in Separate+ offers a feature for color separation as well as additional features for soft proofing and duotone coloration. You can find information about the plug-in on the author's website: http://www.blackfiveservices.co.uk/separate.shtml. The improved version can be found at http://registry.gimp.org/node/471 and on the DVD at the back of the book.

After the installation, you will be able to separate an image into the four color channels of the CMYK color model by using the menu command Image > Separate. The separate channels will be generated as layers in a new picture and can be retouched individually.

At least GIMP can separate the colors for the four-color printing by using grayscale images from one image.

Note: Further information on plug-ins can be found in section 1.5.2. You can find the download addresses in the link list on DVD. Most of the mentioned plug-ins are gathered there as installable files.

0 0

Post a comment