xxxxxxxxxx
61
//define 5 colors in terms of HSB, ordered by brightness
let c1 = {
h: 211,
s: 19,
b: 95
};
let c2 = {
h: 52,
s: 10,
b: 62
};
let c3 = {
h: 47,
s: 35,
b: 51
};
let c4 = {
h: 41,
s: 45,
b: 33
};
let c5 = {
h: 217,
s: 33,
b: 25
};
let xSpacing = 30;
let ySpacing = 60;
let px, py;
let colors = [c1, c2, c3, c4, c5];
let colWidth;
let numCols = 21;
function setup() {
createCanvas(600, 600);
colorMode(HSB);
console.log(colors);
// noStroke();
colWidth = width / numCols;
// strokeWeight(1);
let cIndex=4
for (let x = 0; x < numCols; x++) {
fill(colors[cIndex].h, colors[cIndex].s, colors[cIndex].b);
rect(x * colWidth, 0, x * colWidth + colWidth, height);
cIndex+=1;
if (cIndex==5){cIndex=0;}
}
}
function draw() {
}