void setup() { size(400, 400); // Of course these are to set up the size composition //and the background (255 as default white background) background(255); } int value = 0; // Converts a primitive datatype, string, or array to its integer representation. // Datatype for integers, numbers without a decimal point. The first time a variable is written, it must be declared with a statement expressing its datatype. Subsequent uses of this variable must not reference the datatype because Processing will think the variable is being declared again. void draw() { // draw() must exist if you want the code to run continuously or to process events such as mousePressed(). fill(value); // Sets the color used to fill shapes. rect(130, 100, 150, 200); // first two number (130, 100) are to set the cordinates for the rectangle, and last two (150,200) is the size of the height and the width of the rectangle. } void mouseDragged() // this command sets the mouse dragged action. { value = value + 5; // with the mouse dragged action, you set how much the value changes. (the lower the number, the slower it changes, and the higher the faster the color fill changes) if (value > 255) { // this "if" command allows the program to make a decision about which code to execute. If the test evaluates to true, the statements enclosed within the block are executed and if the test evaluates to false the statements are not executed. So in this case, the command executes when the value is reached 225 value = 0; } }