float r=0; //initialize float variable "r" to 0 float g=0; //initialize float variable "g" to 0 float b=0; //initialize float variable "b" to 0 void setup(){ size(400,400); //set canvas size to 400x400 frameRate(30); //set frame rate to 30 frames per second background(0); //set background color to black } void draw(){ noStroke(); //remove borders on shapes fill(0+r,0+g,0+b); //fill color for ellipse ellipse(mouseX,mouseY,50,50); // draw ellipse at mouse location r=random(0,255); //set r variable to get random number between 0 and 255 g=random(0,255); //set g variable to get random number between 0 and 255 b=random(0,255); //set b variable to get random number between 0 and 255 } void mousePressed(){ fill(random(0,255),random(0,255),random(0,255)); //give rectangle random fill color rect(random(0,400),random(0,400),100,100); //draw rectangle on mouse click }