The drawing on the screen in openFrameworks should be performed in the
testApp::draw() function (see the testApp.cpp section in Chapter 1, openFrameworks Basics). Before this function is called by openFrameworks, the entire screen is filled with a fixed color, which is set by the function
ofSetBackground( r, g, b ). Here
b are integer values corresponding to red, green, and blue components of the background color in the range 0 to 255. Note that each of the
ofSetBackground() function call fills the screen with the specified color immediately.
You can make a gradient background using the
ofBackgroundGradient() function. See its description in the The triangles cloud example section in Chapter 7,