"https://coolors.co/fec5bb-fcd5ce-fae1dd-f8edeb-e8e8e4-d8e2dc-ece4db-ffe5d9-ffd7ba-fec89ahttps://coolors.co/fec5bb-fcd5ce-fae1dd-f8edeb-e8e8e4-d8e2dc-ece4db-ffe5d9-ffd7ba-fec89a";
colorMode(HSB, 360, 100, 100, 100);
palette = createPalette(url);
let offset = -width / 20;
let d = width - offset * 2;
herringboneInRect(x, y, d, random(2, 5), depth);
function recursiveRect(x, y, d, g, depth) {
let step = int(random(1, 4));
for (let j = 0; j < step; j++) {
for (let i = 0; i < step; i++) {
if (random(100) < 90 && w > width) {
recursiveRect(nx, ny, w, g);
herringboneInRect(nx, ny, w, random(0.25, 5), depth);
function herringboneInRect(x, y, d, num, depth) {
rect(x + d / 2, y + d / 2, d);
drawingContext.shadowColor = color(0, 0, 0, 33);
drawingContext.shadowBlur = rd / 3;
translate(x + d / 2, y + d / 2);
rotate(45 + (int(random(4)) * 360) / 4);
scale(random() > 0.5 ? -1 : 1, random() > 0.5 ? -1 : 1);
while (ox < w * sqrt(2)) {
while (ny < w * sqrt(2)) {
rect(nx, ny, rd, rd / 2);
herringboneInRect(nx, ny, rd, random(3), depth - 1);
fill(0, 0, random(10, 100 - 10));
rect(nx, ny, rd / 2, rd);
herringboneInRect(nx, ny, rd, random(3), depth - 1);
function createPalette(_url) {
let slash_index = _url.lastIndexOf("/");
let pallate_str = _url.slice(slash_index + 1);
let arr = pallate_str.split("-");
for (let i = 0; i < arr.length; i++) {
arr[i] = color("#" + arr[i]);