Unit 2 – LA 1 – 1.3

Imma keep this really short, making this was just chill and not very hard, here are the results:

function setup() {
  createCanvas(600, 120);
}

function draw() {
  background('#000000');
  
  if ((mouseX > width/4 - 40) && (mouseX < width/4 + 20) && (mouseY > height/3 - 20) && (mouseY < height/3 +40)) {
  fill('#643A71'); 
  } else {
    fill ('#03B5AA');
  }
  noStroke();
  rect(width/4 - 20, height/3, 40, 40);

  if ((mouseX > width/2 - 40) && (mouseX < width/2 + 20) && (mouseY > height/3 - 20) && (mouseY < height/3 + 40)) {
  fill('#8B5FBF'); 
  } else {
    fill ('#03B5AA');
  }
  noStroke();
  rect(width/2 - 20, height/3, 40, 40);
  if ((mouseX > width/4 * 3 - 20) && (mouseX < width/4 * 3 + 20) && (mouseY > height/3 - 10) && (mouseY < height/3 +40)) {
  fill('#CFCFEA'); 
  } else {
    fill ('#03B5AA');
  }
  noStroke();
  rect(width/4 * 3 - 20, height/3, 40, 40);
}

https://editor.p5js.org/BrainyZebra5/full/ZKonIVklJ