xxxxxxxxxx
20
function setup() {
createCanvas(400, 400);
colorMode(HSB, 360, 100, 100);
}
function draw() {
background(220);
// Select fill colour based on mouse position
if (mouseX < width * 0.5){
fill(290, 80, 90);
}
else{
fill(40, 50, 100);
}
rect(100, 100, 200);
}