blendColor() \ Language (API) \ Processing 1.0
Author: Casey Reas & Ben Fry
Description: Processing is an electronic sketchbook for developing ideas. It is a context for learning fundamentals of computer programming within the context of the electronic arts.
Keywords: Processing, Processing, Interactive Media, Electronic Arts, Programming, Java, Ben Fry, Casey Reas

Reference for Processing version 1.5. If you have a previous version, use the reference included with your software. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Javadoc.

Name | ### blendColor()
Examples |
    color orange = color(204, 102, 0);
    color blue = color(0, 102, 153);
    color orangeblueadd = blendColor(orange, blue, ADD);
    background(51);
    noStroke();
    fill(orange);
    rect(14, 20, 20, 60);
    fill(orangeblueadd);
    rect(40, 20, 20, 60);
    fill(blue);
    rect(66, 20, 20, 60);
Description | Blends two color values together based on the blending mode given as the MODE parameter. The possible modes are described in the reference for the blend() function.
Syntax |
    blendColor(c1, c2, MODE)
Parameters |
c1 | color: the first color to blend
c2 | color: the second color to blend
MODE | Either BLEND, ADD, SUBTRACT, DARKEST, LIGHTEST, DIFFERENCE, EXCLUSION, MULTIPLY, SCREEN, OVERLAY, HARD_LIGHT, SOFT_LIGHT, DODGE, or BURN
Returns | float
Usage | Web & Application
Related | blend() color()

Updated on August 30, 2010 04:29:39pm EDT