5. Colorspaces and Blending Modes
Keywords: GIMP, gimp, Gimp, GNU Image Manipulation Program, gnu image manipulation program, Gimp tutorials, GIMP tutorials, gimp tutorials, Linux applications, linux applications, editing digital images, digital image editing, photo touchup, photo enhancement, enhancement photos, touchup, enhancement, image touchup, image enhancement, enhancement images, touchup images, digital collage, collage, compositing, photo montage, montage, photos, images, stock photos, copyright free photos, selection, selections, mask, masks, color correct, color correction, colorspace, colorspaces, RGB, rgb, hsv, HSV, free-hand tool, free hand tool, lasso tool, bezier path tool, Bezier path tool, layer mask, layer masks, layer, layers, gradient tool, gradients, blend tool, blending, threshold tool, thresholding, histogram, curves tool, curves, levels tool, levels, color picker, eyedropper, wilber, wilber the gimp, Wilber the GIMP, magic wand, fuzzy-select tool, fuzzy select tool, crop tool, transform tool, text tool,  [cell cut: 1485 characters, first 1000 kept]

Next: 5.1 The RGB Colorspace Up: Grokking the GIMP Previous: 4.6 Common Problems and

#
5. Colorspaces and Blending Modes

It is amazing that almost every color we see can be decomposed into a mixture of just three primary colors. Most children learn this at school and know that the primary colors are blue, yellow, and red. Using finger paints, kids can experiment making the so-called secondary colors green, orange, and purple. If hearing worked this way, every musical note could be decomposed into a sum of just three tones. Three tones might make a nice guitar chord, but it's not enough to rock-and-roll.

This interesting fact, that three colors suffice, is due to the way human vision functions. There are three different types of cones in the eye (red, green, and blue); this is what accounts for only three colors being needed. The fact that all the colors can be reproduced by mixing only three is extremely useful. It's like an alphabet. With a small collection of letters, any word can be made and any meaning can be conveyed. The lesson is the same for color. With only three color phosphors a computer monitor can, in principle, express any color; with only three color inks, in principle, a printer can print any color.

There are some practical limitations to the concept of reproducing all colors with only three primaries. However, without going into more detail, it suffices to know that the set of colors that can be made by adding different amounts of three primaries is called a colorspace. The shape of the space defined in this way is a cube.

In principle, the three primaries used to produce a colorspace are not unique. In theory, any triple of independent colors can be used to decompose a colorspace. However, in practice, colorspaces created by two different sets of primaries are not identical. Typically, there is a part of the color range of one space that cannot be reproduced by the other.

The best choice of primaries usually depends on the type of physical device used to create the color. Monitors use red, green, and blue phosphors to create a colorspace called RGB. Printers use cyan, magenta, and yellow inks and work in a colorspace called CMY. It is the physical way colors are combined that explains the two spaces. Monitors emit light, whereas inks only reflect light. When we shine a white light on ink, what we see is the color component of the white light that is reflected and not absorbed by the ink.

Knowing about colorspaces is important in the GIMP for several reasons. To effectively correct color in an image requires some notions about how colors interact. Furthermore, looking at different color components of an image can often be quite useful for making selections and masks.

This chapter is composed of two main parts. The first part begins with a tutorial on three colorspaces: RGB, HSV, and CMYK. The RGB space is discussed in detail, and this is followed by a description of the relationship between the RGB and HSV spaces. HSV is a more perceptually useful space than RGB and finds many uses in the GIMP. Although the GIMP is not CMYK-capable, this important pre-press colorspace is also discussed. Its benefits and drawbacks are described and its importance to pre-press is explained.

The second part of the chapter presents transparency and the GIMP's 16 blending modes from a colorspace perspective. Blending modes are powerful tools for combining colors between layers. You can also use them to control how the painting tools apply color. The colorspace presentation in the first part of this chapter will be very useful in understanding how these modes work. The final section of this chapter presents some practical uses of the blending modes.

- 5.1 The RGB Colorspace
- 5.2 The HSV Colorspace
- 5.3 Relating HSV to RGB
- 5.4 The Subtractive Color Systems CMY
  and CMYK
- 5.5 Conversion to Grayscale
- 5.6 The Blending Modes
  - 5.6.1 The `Normal`, `Dissolve`, and `Behind` Blending Modes
  - 5.6.2 The `Addition`, `Subtract`, and `Difference` Blending Modes
  - 5.6.3 The `Multiply (Burn)`, `Divide (Dodge)`, `Screen`, and `Overlay` Blending Modes
  - 5.6.4 The `Darken Only` and `Lighten Only` Blending Modes
  - 5.6.5 The `Hue`, `Saturation`, `Value`, and `Color` Blending Modes
- 5.7 Opacity and Transparency
- 5.8 Practical Uses of Blending Modes
  - 5.8.1 Colorization
  - 5.8.2 Realistic Shadows and Highlights
- 5.9 Common Problems and
  Frequently Asked Questions

Next: 5.1 The RGB Colorspace Up: Grokking the GIMP Previous: 4.6 Common Problems and
©2000 Gimp-Savvy.com