xxxxxxxxxx
24
let numSwatches = 360;
let w;
let swSize = 360 / numSwatches;
let off = 0;
function setup() {
createCanvas(800, 400);
colorMode(HSB, 360, 100, 100); //color wheel;saturation;brightness
w = width / numSwatches;
noStroke();
}
function draw() {
background(220);
off++;
for (let sw = 0; sw < numSwatches; sw++) {
let x = sw * w;
let h = sw * swSize + off;
h %= 360;
fill(h, 100, 100);
rect(x, 0, width / 36, height);
}
}