xxxxxxxxxx
const colors1 = ["#aa9dd3", "#dd817e", "#dc706d", "#cc514c", "#b73738", "#a1242c", "#6f2333", "#582127", "#362228", "#15161b"];
const colors2 = ["#090d10", "#201d28", "#1d1b33", "#211851", "#2b1e6e", "#473988", "#7f6dc2", "#9f85d8", "#cec1ef"]
function setup() {
createCanvas(700, 700);
}
let r=0;
let c=0;
function draw() {
noStroke();
translate(width/2,height/2);
// Background
rectMode(CENTER);
fill(colors1[0]);
rect(width / 2, 0, width / 2, height);
fill(colors2[0]);
rect(0, 0, width / 2, height);
// Set #1
fill(colors1[1]);
rect(0,0, width);
fill(colors2[1]);
rect(18, 0, width - 45);
// Set #2
fill(colors1[2]);
rect(0, 0, width - 45 * 2);
fill(colors2[2]);
rect(14, 0, width - 45 * 3 + 4);
// Set #3
fill(colors1[3]);
rect(0, 0, width - 45 * 4);
fill(colors2[3]);
rect(10, 0, width - 45 * 5 + 8);
// Set #4
fill(colors1[4]);
rect(0,0, width - 45 * 6);
fill(colors2[4]);
rect( 6, 0, width - 45 * 7 + 12);
// Set #5
fill(colors1[5]);
rect(0,0, width - 45 * 8);
fill(colors2[5]);
rect(2,0, width - 45 * 9 + 16);
// Set #6
fill(colors1[6]);
rect(0,0, width - 45 * 10);
fill(colors2[6]);
rect(- 2, 0, width - 45 * 11 + 20);
// Set #7
fill(colors1[7]);
rect(0,0, width - 45 * 12 + 30);
fill(colors2[7]);
rect( - 6, 0, width - 45 * 13 + 44);
// Set #8
fill(colors1[8]);
rect(0,0, width - 45 * 14 + 54);
fill(colors2[8]);
rect(- 10, 0, width - 30 * 15 + 64);
// Set #9
fill(colors1[9]);
rect(0,0, 54);
r++;
}