var colors = ['red', 'blue', 'green','yellow', 'black','white', 'grey', 'magenta', 'purple'];
function setup() {
createCanvas(600, 120);
}
function draw() {
background(220);
fill(colors[0]);
rect(265, 0, 70, 40);
fill(colors[1]);
rect(265, 40, 70, 40);
fill(colors[2]);
rect(265, 80, 70, 40);
fill(colors[3]);
rect(335, 80, 70, 40);
fill(colors[4]);
rect(335, 40, 70, 40);
fill(colors[5]);
rect(335, 0, 70, 40);
fill(colors[6]);
rect(195, 0, 70, 40);
fill(colors[7]);
rect(195, 40, 70, 40);
fill(colors[8]);
rect(195, 80, 70, 40);
}