xxxxxxxxxx
23
var h = 150;
function setup() {
createCanvas(400, 400);
colorMode(HSB, 360, 100, 100, 100);
}
function draw() {
background(200, 10, 90);
// Draw a circle in the centre of the canvas,
// using a variable for hue
fill(h, 100, 100);
ellipse(200, 200, 100);
}
// When the mouse is clicked, turn the hue to blue
function mouseClicked(){
h = 250;
}