int frame = 0; int c = 0; int vc = 10; void setup() { textSize(10); frameRate(5); } void draw() { background(c); c = c + vc; if (c >= 255 || c < 0) { vc = -vc; } frame++; fill(255-c,c-255,0); text( "Frame #"+frame, 0, 10); }