Open as new workspace

Homepage example

View source Pathogen · 23 lines
define ViewBox(0, 0, 1600, 1600);
define default PathLayer('main-path-layer') ${
  fill: #bbb;
  stroke: #222;
  stroke-width: 1;
};

// We need a thumbnail
let colors = Color.palette(oklch(0.6695 0.2483 330.1),
                           oklch(0.6589 0.1597 131.9), 
                           244);
let center = Point(800, 800);
for ([color, index] in colors) {
  let petalLayer = PathLayer(`layer-${index}`) ${
    fill: color.lighten(20%).alpha(60%);
    stroke: color;
    stroke-width: 4;
  };
  petalLayer.apply {
    let petalCenter = center.polarTranslate(calc(32pi * (index / colors.length)), calc(50 + (index * 3)));
    circle(petalCenter.x, petalCenter.y, calc(10 + (244 / 3.6)));
  }
}