A short tutorial on RGB color mixing and glazing grids


(Elle Stone) #1

Do digital painters know as much about mixing colors in the digital darkroom as “wet” painters know about mixing real paint pigments on a palette or on the canvas?

Do digital painters need to know anything about color mixing theory as it applies to the digital painting studio? After all, in the digital painting studio experimenting is free (well, except for your time and the cost of your computer and monitor), and results are immediately viewable on the screen. So if you like what you see, that’s all that counts, right?

Out there in the real world, the laws of physics and chemistry absolutely dictate the results of mixing real paint pigments on a palette or on the canvas. And paints and canvas aren’t cheap. So there is a measureable incentive to learn the basics of real world paint mixing.

In the digital darkroom, we don’t have the laws of physics and chemistry to dictate the results of color mixing. Instead we have considerations such as radiometrically correct color mixing in linear gamma RGB color spaces vs color mixing with gamma artifacts in perceptually uniform color spaces.

If you made it all the way to here before falling asleep or moving on to something else :slight_smile: , I posted a tutorial on RGB color mixing: Painting and blending colors using Addition, Subtract, Divide, and Multiply blend modes (http://ninedegreesbelow.com/photography/glazing-grids-and-rgb-color-mixing-painting.html)

The tutorial shows “glazing grids” for mixing colors using Red, Green, and Blue and also using Cyan, Magenta, and Yellow. It is absolutely the case that colors in the digital darkroom combine additively, whereas out there in the real world paint pigments combine subtractively. But nonetheless you really can produce “all the colors” in your chosen RGB working space just by combining Cyan, Magenta, and Yellow.

I made two small paintings to illustrate using the four basic RGB blend modes in a linear gamma RGB working space, and the tutorial shows the individual layers for each painting:

  • A stylized rendition of one of Martin J. Heade’s amazing hummingbirds:

My stylized hummingbird is based on the lower right bird from a Wikipedia public domain photograph of Heade’s “Cattleya Orchid and Three Brazilian Hummingbirds” (https://en.wikipedia.org/wiki/Martin_J._Heade). Starting with a very dark base layer, I used two Divide layers and an Addition layer to establish shapes and colors, and then used a Multiply layer to add the final details and shading - my apologies, I’m just starting to try to make paintings, and I didn’t do a very good job of painting the hummingbird’s back or the turn of his head.

  • An experiment in painting colors onto a black and white image using only Cyan, Magenta, and Yellow:

The starting black and white image is a crop from my Leaves in May image (Leaves in May image). Despite the black dot above the crop, I only used Cyan, Magenta, and Yellow to add color to the black and white image, applying these colors using a low-opacity brush set to multiply blend mode.

Anyway, returning to the question of whether digital painters need to know anything about radiometrically correct color mixing in the digital painting studio, it would be really stupid to tell someone “You can’t make nice paintings in your digital studio if you don’t understand the basics of RGB color mixing”. Many digital artists have made many excellent paintings without ever having stopped to think twice about things like color spaces and radiometrically correct color mixing. Artistic talent and vision are infinitely more important than knowing the difference between linear gamma and perceptually uniform color mixing. And before the advent of fast computers and high bit depth image editing, working in linear gamma color spaces wasn’t even possible.

However, today we do have fast computers and high bit depth image editors. So if you don’t already use linear gamma RGB working spaces for painting (or when editing photographs), it might be worth your time to experiment to see whether you prefer radiometrically correct RGB color mixing to results from mixing colors in perceptually uniform color spaces.

It might also be worthwhile to spend some time systematically exploring RGB color mixing using glazing grids. The tutorial color mixing grids use 100% saturated Red/Green/Blue or Cyan/Magenta/Yellow, but it’s interesting to experiment with the more limited color palettes created by using less saturated colors.

Finally, of the four basic RGB blend modes, Addition and Subtract produce the same results in any linear gamma RGB working space, but results of Multiply and Divide depend very much on the RGB working space. So experimenting with different RGB working spaces is also something that might be worth doing. The tutorial has a short note on choosing an RGB working space.


From the Community Vol. 2
(Andrew) #2

Yesterday I ordered the parts for my photo PC. When I’ve got it going, and Ubuntu, RT and Gimp installed, I will try your Gimp version, and explore this linear gamma approach and read up on colour spaces etc., and hopefully get to grips with the foundations of digital processing. (But it might take a while…)


(Elle Stone) #3

When your new computer is up and running, if you have questions or comments as you explore digital processing, I’m very interested in what you discover and how you put the information to use while editing. I think the main advantage of “getting to grips with the foundations of digital processing” (nice phrase, by the way) is that it allows you to systematically think through “how to get from point A to point B”, and in the process maybe even discover new ways to solve editing problems, that can be shared with other people, who in turn add their own discoveries and applications. It’s a nice cycle of discovery, it seems to me.


(Brien Dieterle) #4

Hi Elle, your articles are fantastic. I think I worked through some of the same tests you did while exploring 36-light spectral mixing. I wrote a separate post here https://discuss.pixls.us/t/spectral-rendering-scene-linear-ocio-etc/5715

I have only implemented Normal mode and a mode called Weighted Geometric Mean, which is very similar to multiply. The results are very interesting when you go from RGB (3) to 36 spectral wavelengths. Cheers!


(Elle Stone) #5

Hi @briend - and thanks! for the compliment.

Your work with mypaint sounds really nice, both the smudging code and the part about adding OCIO color management. I’ve been reading the links you provide and the information is fascinating.


(Brien Dieterle) #6

Thank you Elle, I’m looking forward to your polite “everything you’re doing is wrong” feedback :smiley:


(Elle Stone) #7

Well, with Troy S in your corner, I sort of doubt that there will be much that’s too far amiss :slight_smile: .

This spectral stuff is the way of the future, I suspect, so time you put in figuring it all out will be time well spent. I can hardly wait until there’s a working OCIO version to test. And new and better smudge brushes are something I always like experimenting with.


(Brien Dieterle) #8

I agree, spectral N floats instead of 3, much more RAM needed, but it’s the future. For now spectral+smudge is much more manageable since the # of pixels involved is just the brush/tile size. By the way, I really hope your website comes back up, I was right in the middle of reading stuff and it disappeared yesterday :frowning:


(Elle Stone) #9

Hi @briend - did my website come back up for you? I haven’t accessed the site at a time when it wasn’t up and running, well, not recently, once several months ago I noticed it went down for a short time.

I’m on shared hositing, and I think the host is pretty good - they provide free SSL certificates and they are careful to not allow their servers to be filled up with spam-sending websites (unlike my old host). On the minus side, since switching hosts images seem to load somewhat more slowly.

Given the very low cost of my current hosting plan, if my site is down for a few minutes every now and again, I guess that might be expected. Though of course it’s not very nice that the site disappeared in the middle of reading an article, so my apologies!


(Brien Dieterle) #10

Yes, it did. Sorry for panicking just a little bit. Have you ever considered mirroring your articles and software by a library like http://www.ibiblio.org/ ?
I noticed huevaluechroma.com is a hosted project, and I think your materials would be a good fit :slight_smile: