Skip to content

Commit e04127d

Browse files
vary colors for authors
1 parent 326fb25 commit e04127d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/civitas/why/village/scene.clj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,14 +411,15 @@
411411
(let [authors (->> (:author @db/db)
412412
(sort-by :name))
413413
n (count authors)
414+
colors (cycle (take 11 color/palette))
414415
r 6]
415416
[:g
416417
[:g {:transform "translate(0,-8)"}
417418
(mu/mo (str n " authors"))]
418419
[:g {:transform "scale(0.8)"}
419-
(for [[{:keys [image]} [x y]] (map vector authors (geom/spiral 100))]
420+
(for [[{:keys [image]} [x y] color] (map vector authors (geom/spiral 100) colors)]
420421
[:g {:transform (str "translate(" (* r x) "," (* r y) ")")}
421-
(svg/polygon {:fill (:dgreen col)
422+
(svg/polygon {:fill color
422423
:stroke (:dblue col)
423424
:stroke-width 1}
424425
(geom/hex r))

0 commit comments

Comments
 (0)