skip to main content

Painting and blending colors using Addition, Subtract, Divide, and Multiply blend modes

Additive color mixing in RGB working spaces is the foundation of both digital painting and digital photography. This article uses digital "glazing grids" to demonstrate the various ways RGB colors can be mixed in the digital darkroom or painting studio, and then shows the layer stacks for two paintings done using Addition, Divide, and Multiply layer and brush blend modes.

Written November 2016.

Introduction

Additive color mixing in RGB working spaces is the foundation of both digital painting and digital photography. This article uses digital "glazing grids" to demonstrate the various ways RGB colors can be mixed in the digital darkroom or painting studio, and then shows the layer stacks for two paintings done using Addition, Divide, and Multiply layer and brush blend modes. The first painting starts with a very dark base layer and adds color using the Divide and Addition blend modes. The second painting starts with a black and white illustration made from a photograph and adds color using the Multiply blend mode.

The images below were painted using my patched version of high bit depth GIMP ("GIMP-CCE"). Both default GIMP and GIMP-CCE provide LCH layer and painting blend modes, LCH color picking tools, and an LCH "Hue-Chroma" tool for modifying colors. Unlike default high bit depth GIMP 2.9, GIMP-CCE supports editing in color spaces other than sRGB.

Colors only mix properly in linear gamma RGB working spaces. A selection of linear gamma RGB working spaces is available from my github ICC profile pack.

Each Section below has an "on-hover" (or "on-click") figure. To see the various images, just hover your mouse over, or else click on, the links below the figure caption.

RGB and CMY glazing grids

Digital and "wet media" glazing grids

If you've done much painting with real paint, you might have made a glazing grid. A glazing grid shows you the range of colors you can produce using your chosen color palette when painting one color over another color.

I'm sure you already know that when painting using real paint and canvas:

  1. Colors mix subtractively.
  2. The primaries are Cyan, Magenta, and Yellow, which in theory can be used to mix any color, but in practice most people use rather more extensive palettes because of mixing limitations imposed by the purity and saturation of available paint pigments.

And for making digital images, when editing in an RGB working space:

  1. Colors mix additively.
  2. The primaries are Red (1,0,0), Green (0,1,0), and Blue (0,0,1), which in theory and also in practice can be mixed to produce any color contained in the image RGB working space's color gamut.

When making digital images in an RGB working space, mixing Red, Green, and Blue is not the only way to make all the colors in your chosen RGB working space. Figure 1 demonstrates that whether you start with Red (1,0,0), Green (0,1,0), and Blue (0,0,1), or with Cyan (0,1,1), Magenta (1,0,1), and Yellow (0,1,1), you can produce all six "most saturated and brightest colors" (Red, Green, Blue, Cyan, Magenta, and Yellow). And if you can produce all six "most saturated and brightest" colors, then you can produce all the other colors.

RGB and CMY Color Mixing in an RGB working color space
Red/Green/Blue using Addition blend mode over a black base layer
Cyan/Magenta/Yellow using Divide blend mode over a black base layer
Red/Green/Blue using Subtract blend mode over a white base layer
Cyan/Magenta/Yellow using Multiply blend mode over a white base layer
Red/Green/Blue using Multiply blend mode over a white base layer

Things you need to know about mixing colors in the digital darkroom

You can't divide by zero! When using Cyan/Magenta/Yellow to mix colors using the Divide blend mode, the base layer must have all three RGB channel values be somewhat greater than 0. And similarly the nominally "0" channels in the Cyan/Magenta/Yellow colors must be somewhat greater than 0.

When using Red/Green/Blue to mix colors using the Multiply blend mode, you can't produce all the colors! You can't produce Cyan, Magenta, or Yellow. This is because the Red, Green, and Blue primaries have two channel values that equal zero. When using Addition, Subtract, Multiply, or Divide to mix Red/Green/Blue or Cyan/Magenta/Yellow in an RGB working space, in addition to the five combinations shown above, there are three more combinations to try. None of the remaining three combinations allow to mix all six colors — three of the colors, either Red/Green/Blue or Cyan/Magenta/Yellow, will be missing.

In GIMP-CCE, the Multiply, Divide, Addition, and Subtract (and also the Normal) blend modes only produce radiometrically correct color blending in linear gamma RGB working color spaces, such as the linear gamma color spaces that are included in my github ICC profile pack. In addition, in GIMP-CCE the LCH layer blend modes don't produce correct results unless the image is in a linear gamma RGB working color space. To summarize, when using GIMP-CCE, use a linear gamma RGB color space unless you know you have a good reason to temporarily! switch to a perceptually uniform RGB color space.

The Addition and Subtract blend modes are chromaticity-independent editing operations, meaning adding or subtracting any two colors in color space A will produce the same color as converting the two colors from color space A to color space B, and then adding or subtracting the two colors.

The Multiply and Divide blend modes are chromaticity-dependent editing operations, meaning multiplying or dividing any two colors in color space A will produce a different result than converting the two colors from color space A to color space B, and then multiplying or dividing the two colors. The color space you use makes a difference!

In default GIMP, you should only edit images that are in GIMP's built-in sRGB color space, as GIMP linearizes the sRGB TRC as needed, on a per-operation basis. As an aside, as of September 2017, my remaining reason for not using default GIMP for editing sRGB images is that default GIMP Levels and Curves operations still don't operate on linear RGB by default. Instead you must make sure you are using "linear" precision, go to Preferences to activate the advanced color options, and when using Levels and Curves, make sure to open the Advanced options and click on using the gamma hack. Unfortunately using this gamma hack with other editing operations produces entirely unpredictable results unless you know in advance whether the operation calls for linearly encoded RGB or not.

Painting "from dark to light" using the Divide and Addition layer blend modes

Martin J. Heade is a painter associated with the Hudson River School. I've always been fascinated by Heade's glowing flowers and birds painted against more or less dark backgrounds, and learning how to make glowing colors (whether in a photograph or a painting) is very high on my list of "things to learn how to do".

Below is my attempt at a stylized rendition of one of Heade's amazing hummingbirds, specifically the lower right bird from a Wikipedia public domain photograph of Cattleya Orchid and Three Brazilian Hummingbirds. I think my rendition has some pretty (and glowing!) colors and textures, but I did a really poor job of painting the hummingbird's back and the turn of his head.

Normally we think of starting with a light canvas and making darker brush marks to establish color and tonality. To paint my stylized rendition of Heade's hummingbird, I reversed this process: I started with a very dark base layer and then used Divide and Addition blend modes to produce lighter areas.

Painting from dark to light using Divide and Addition blend modes: A stylized rendition of one of Martin J. Heade's amazing hummingbirds
My stylized rendition of one of Martin J. Heade's hummingbirds (final image)
Martin J. Heade's actual hummingbird
Sketched outline of Heade's bird and branch (composition reference)
Layer stack for my stylized rendition of Heade's hummingbird
Layer for the base color (LCH L=7, C=2, H=90), Normal blend
Layer for painting the background, Divide blend mode
Layer for painting the feather colors, Addition blend mode
Layer for intensifying the feather colors, Divide blend mode
Layer for painting the edges, Multiply blend mode

The "on hover" image above shows the five individual layers in my stylized rendition of Heade's hummingbird, with "1. Base color" at the bottom of the stack and "5. Define edges" at the top. The two "reference" layers at the top aren't part of the layer stack that produces the final image, but I used Heade's actual hummingbird as a "color reference", and I made a sketch of the bird and the branch as a "composition reference".

As you look at the numbered layers that make the final image, keep in mind that I'm showing you these layers all set to Normal blend mode. But in the actual GIMP-CCE XCF layer stack, only the base (bottom) layer is set to Normal blend mode, and the remaining five layers are variously set to Divide, Addition, and Multiply blend modes, as indicated by the layer labels.

If you are interested in experimenting with working from dark to light instead of from light to dark, here are some points to keep in mind:

  1. Division by or of zero doesn't work!
    • If you use Divide blend mode in your layer stack, the bottom layer must be a color that has all three channel values higher than 0. For example, in the above image "1. Base color" layer has the RGB floating point color (0.008119, 0.007784, 0.006289).
    • Likewise any color you want to paint on a layer set to Divide blend mode should have all three RGB channel values greater than 0.0, even if only by a small amount. So for example painting the RGB floating point color (1.0, 0.001 0.001) on a layer set to Divide blend mode is OK. But painting the RGB floating point color (1.0, 0.0, 0.0) just doesn't work.
  2. To produce a given color using Divide blend mode layers, start with the inverse of that color and paint using the resulting color:

    In my rendition of Heade's hummingbird, when painting on the two layers that are set to Divide blend mode, I mostly used brushes set to use the Multiply blend mode. So to produce a given color I used the Hue of the inverted color. But I made the Lightness of the painted "opposite hued color" very light, which allows to use the brush set to Multiply blend mode to build up the final color a little at a time. For example, on a layer set to the Divide blend mode, using Multiply to paint progressively darker cyan colors produces progressively brighter red colors.

  3. One way to paint on a layer set to the Divide, Multiply, Addition, or Subtract blend modes when using a brush blend mode other than Normal blend:
    • To paint colors on a layer set to Divide or Multiply blend mode, start with a solid white layer (dividing or multiplying by white doesn't change the underlying colors).
    • To paint colors on a layer set to Addition or Subtract blend mode, start with a solid black layer (adding or subtracting black doesn't change the underlying colors.

    GIMP also allows to paint directly on transparent layers using various blend modes, which was not the case when I painted my stylized rendition of Heade's hummingbird (see this bug: GIMP and GIMP-CCE only allows to paint on a transparent layer if the brush is set to use Normal blend mode).

  4. While painting my rendition of Heade's hummingbird, I mostly worked from dark to light. However, to add detail and shading (Slide 8, "Layer for painting the edges"), I worked from light to dark, using a solid white Multiply Blend layer and painting the details and shading with the brush also set to use Multiply blend mode.

Painting "from light to dark" using Multiply blend mode and a palette "restricted" to Cyan, Magenta, and Yellow

As shown in the fourth glazing grid in Section B above, when using the Multiply blend mode on a solid white layer, you can make any color in your RGB working space using just Cyan (0,1,1), Magenta (1,0,1), and Yellow (1,1,0). Figure 3, "Painted leaves", is an experiment in painting colors onto a black and white image using only Cyan, Magenta, and Yellow. The experiment was inspired by a tutorial on painting a watercolor of some leaves using just three paint colors — red, green, and yellow.

"Painted Leaves", an experiment in painting colors onto a black and white image using only Cyan, Magenta, and Yellow
Finished painted image
Black and white image to be painted
Colors painted on the Multiply blend layer
Layer stack for painting colors over the black and white image

To make the "Painted leaves" image, I used a low opacity brush on an initially solid white layer. The brush and also the initially solid white layer were set to Multiply blend mode. As I alternately picked Cyan, Magenta, or Yellow to paint with, it was interesting to see, for example, blue colors appear by alternately painting Cyan and Magenta in the same spot, and green colors appear by alternately painting Cyan and Yellow.

Painting using Multiply blend on a layer that's also set to Multiply blend does darken the underlying black and white image, so the tonality of the black and white layer might need adjustment. Another way to lighten the resulting tonality is to paint over the too-dark areas on the Multiply layer using a lighter color, with the brush set to LCH Lightness blend mode.

Unlike painting with real CMY paints on real surfaces, for digital RGB painting, using Multiply blend mode with a palette "restricted" to Cyan (0,1,1), Magenta (1,0,1), and Yellow (1,1,0) doesn't actually produce a painting made with a limited color palette. To actually restrict your palette using CMY colors applied using Multiply, choose three colors with "more or less close to" Cyan, Magenta, and Yellow hues, that aren't fully saturated and bright in your chosen RGB working space. The same consideration of course applies when "restricting" your palette to Red (1,0,0), Green (0,1,0), and Blue (0,0,1).