There is a nice way to change the overall color of a drawing image by multiplying ("modulating") the color components of each pixel by some fixed number. It is realized by using the
ofSetColor() function. Namely, calling
ofSetColor( r, g, b ) or
ofSetColor( r, g, b, a ) before
implies that the red, green, blue, and alpha components of each image's pixel will be multiplied by r' = r / 255.0, g' = g / 255.0, b' = b / 255.0, and a' = a / 255.0 respectively.
Note that the parameters
ofSetColor lie in the 0 to 255 range, so r', g', b', a' lie in the range [0..1]. So, by using such a modulation, you can decrease or retain the color components of pixels but you cannot increase them.
For arbitrary manipulations ...