xxxxxxxxxx
49
/*Assignment 2: Color
By Sawyer Farias
*/
function setup() {
createCanvas(600, 400);
colorMode(RGB)
noStroke();
}
/*
To get the different colored squares just change the color mode
*/
function draw() {
background(0);
//Color 1, top left small square
fill(120, 60, 90);
square(0, 0, 100);
// Color 2, top left medium square
fill(120, 85, 90);
square(10, 10, 150);
//Color 3, bottom right small square
fill(150, 56, 150);
square(500, 300, 100);
//Color 4, bottom right medium square
fill(80, 20, 65);
square(440, 240, 150);
//Color 5, middle big square
fill(120, 78, 60);
square(120,25, 350);
//Color 6, top right rect
fill(90, 55, 90);
rect(480, 0, 110, 240 );
//Color 7, bottom left rect
fill(150, 45, 80);
rect(10, 160, 100, 240);
}
function mousePressed() {
save("Assignment2_SawyerFarias.png");
}