blendMode

Any way to do ‘real-life’ paint mixing, ex. blue and yellow make green kinda thing? Thanks!

This thread and the code in it may help you, it shows a lot of the variations possible with blendMode

http://codea.io/talk/discussion/4989/blendmodes

Multiply is the blend mode that usually resembles real live coloring, because it uses cyan, magenta and yellow as primaries. These are the real real life primaries in spite of what most art teachers would say. Red yellow and blue are old school and false primaries. Color printer manufacturers know this. That is why they use cyan, magenta and yellow as primaries.

@tyxs I don’t think MULTIPLY uses CMYK, it still uses RGB, it’s just that the color mixing acts similar to as if it were subtractive.

I think that is because multiply is a blend mode for screens. CymK only comes into play when you prepare for printing. The K in cymk is not an extra primary color. It is just an extra print plate to produce a better black and not waste color inks in black areas.

-- color sub

function setup()
end

function draw()
    background(255)
    ellipseMode(CENTER)
    blendMode(MULTIPLY)
    fill(color(0,255,255))
    ellipse(WIDTH/2,HEIGHT*4/7,WIDTH/2)
    fill(color(255,255,0))
    ellipse(WIDTH*3/7,HEIGHT*3/7,WIDTH/2)
    fill(color(255,0,255))
    ellipse(WIDTH*4/7,HEIGHT*3/7,WIDTH/2)
end

Blendmeister! B-)

=D> Thanks for the code!

For mixing paint between a lot of colors it might be faster to add the individual rgb values together and then divide by two (or by however many colors you’re mixing). You only have to do that once, I used something like this in a very old flash demo (http://kirl.nl/DBFLiquid.html)

For partial blends like jvms example blendmodes work great.