3

Everybody who ever painted knows that blue and yellow make green. Yet on a computer (at least in the RGB model), blue and yellow make white. Yes, it's mixing paint vs adding light, but how do you explain the difference, and how can one model the "paint mixing" on a computer, e.g. in gimp?

  • 1
    Applications such as Painter are geared for this sort of thing. I can't say anything with respect to Gimp, but Photoshop is horrible about it. – Scott May 22 '15 at 15:46
  • @AndrewH see diagram and detailed explanation here - en.m.wikipedia.org/wiki/RGB_color_model R+G=Y, R+G+B = white, therefore Y+B = white – user56reinstatemonica8 May 22 '15 at 15:51
  • @user568458 Yea I looked it up after that comment, On a computer, colors work off the additive color system (all of the 3 primaries together form white), whereas paint in real life works off the subtractive color system (all 3 primaries together form black). – AndrewH May 22 '15 at 15:54
2

Edited

Reading this sometime later I realized that this does not answer the question.

The answer is indeed blending modes.

And yes, blue and yellow makes black. But the problem with this is not the multiply mode, the problem is that the mix should be yellow and cyan, not blue.

In RGB mode yellow is a mixture of Red and Green, and if you add blue you get white.

In multiply mode it is let's say the opposite.

You take Yellow (pigment primary) and Blue (in pigment blue has cyan and some magenta) so basically if you keep mixing them, as you are using all 3 primary colors you get black.

Here is a topic where I try to address some pre-computer blending modes: https://photo.stackexchange.com/questions/83002/what-is-the-pre-computer-version-of-photoshops-blending-modes/83006#83006


The pigment samples

There are some applications that simulate paint styles.

One free and good one is MyPaint http://mypaint.intilinux.com/

One that has a great look, also free shipped in Windows 8 is FreshPaint http://apps.microsoft.com/windows/es-mx/app/fresh-paint/1926e0a0-5e41-48e1-ba68-be35f2266a03

The commercial leader is Corel Painter http://www.painterartist.com/us/product/paint-program/

The "wet" component

These programs have a component that will help you a lot. They all have a fresh paint mode to some degree. This is that mix colors like a wet medium (oil, acrylic, watercolor). Not only they mix the color by subtraction, but they drag it.

A no specialized software will put the next color above the previous one.

Using normal software

If you choose to use gimp you need to change the Paintbrush mode.

In the tool box choose Mode > Multiply. This will not look like an oily medium but as a marker. The blue marker will make a previous yellow color green, but also will make each pass darker, like when you use a water based marker.

Use RGB color mode

Don't use a CMYK model to "paint". The use of black for print use very specific matrices to assign the ink.

You will be making crazy mixings and these effects work better in RGB. You can transform the RGB to a CMYK output later.

The light samples

I probably would use a 3d render to simulate projections. As always my first free choice is Blender http://www.blender.org/

  • Thanks, I'm not interested so much in programs that can mix colors, but rather in how they do it. I tried "multiply" in gimp with pure yellow and blue, and got black. – aditsu May 22 '15 at 23:26
  • Real paint can mix in an arbitrary fashion, its impissible to say without knowing the exact spectral components of the paint. And if you have any chemical occourence you get into problems. – joojaa Jun 13 '17 at 5:21
  • Oh and cyan is blue, just a very pure one. – joojaa Jun 13 '17 at 5:23
  • 1
    Cyan is cyan. The term "blue" is relative. Color names change in history and context. – Rafael Jun 13 '17 at 14:54
1

Most likely they blend in hsv space:

from Tkinter import *
from colorsys import rgb_to_hsv, hsv_to_rgb

def ablend(a, fg, bg):
    return ((1-a)*fg[0]+a*bg[0],
            (1-a)*fg[1]+a*bg[1],
            (1-a)*fg[2]+a*bg[2])

# replace ablend with hsvblend
def hsvblend(a, fg, bg):
    fgh = rgb_to_hsv(fg[0]/255.,fg[1]/255.,fg[2]/255.)
    bgh = rgb_to_hsv(bg[0]/255.,bg[1]/255.,bg[2]/255.)
    ret = hsv_to_rgb(
            (1-a)*fgh[0]+a*bgh[0],
            (1-a)*fgh[1]+a*bgh[1],
            (1-a)*fgh[2]+a*bgh[2])
    return ret[0]*255,ret[1]*255,ret[2]*255


root = Tk()
num=8.0

fg=(255, 255, 0)
bg=(0,0,255)

for i in range(int(num)+1):
  col = ablend(i/num, fg, bg)
  e = Label(root, width=20,height=2,text='#%02x%02x%02x' % col, background='#%02x%02x%02x' % col)
  e.grid(row=i)
  col = hsvblend(i/num, fg, bg)
  e = Label(root, width=20,height=2,text='#%02x%02x%02x' % col, background='#%02x%02x%02x' % col)
  e.grid(row=i,column=1, sticky=E+W)
root.mainloop()

results in:

colors

Image 1: Colors as of result of blend (left), blend in hsv space (right). Note that the RGB colors are much more saturated than paint colors so green is not entirely halfway to deep blue and perfect yellow.

PS: How it is computed is not generally called color theory by the way. That is something different.

  • Heh, I wasn't expecting actual code here :) Is that python? Anyway, basically you're saying that blending the h, s and v components is similar to mixing paint, right? I'm guessing the "h" one (hue) is the key. It would be nice to expand on that. – aditsu May 23 '15 at 7:53
  • @aditsu not entirely no but quite close – joojaa May 23 '15 at 8:03
0

If you switch over to the CMYK gamut, I suspect you will get mixes much more like what you would expect from physical pigments. There are drawbacks though. One is that CMYK is a smaller gamut than RGB. For example, 100% K is only around 93% RGB black, so switching from RGB to CMYK, you may notice the colors flatten a bit. Another thing to watch out for is transparency effects like Screen, Color Burn, and even drop shadow effects in the various CC products can produce unexpected results. Yet one more is the fact that there are many effects and filters that are unavailable in CMYK color mode. I'm not familiar with GIMP, so your results may vary.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.