xxxxxxxxxx
30
let w
function setup() {
createCanvas(500, 500);
w = 25
colorMode(HSB, 360, 100, 100);
}
function draw() {
background(220);
stroke(255)
strokeWeight(.1)
for (let x = 0; x < width; x += w) {
if (mouseX > x && mouseX < x + w) {
fill(map(x, 0, width, 0, 360), 100, 100)
} else {
fill(0, 0, 0)
}
rect(x, 0, w, height)
}
}