Skip to content
Snippets Groups Projects
Commit 2c508f95 authored by Simon Belak's avatar Simon Belak
Browse files

Pick a random color for autogenerated collections

parent f3de84c6
Branches
Tags
No related merge requests found
......@@ -29,7 +29,8 @@
:color color
:description description)))
(def ^:private colors
(def colors
"Colors used for coloring charts and collections."
["#509EE3" "#9CC177" "#A989C5" "#EF8C8C" "#f9d45c" "#F1B556" "#A6E7F3" "#7172AD"])
(defn- ensure-distinct-colors
......
......@@ -281,7 +281,7 @@
collection (magic.populate/create-collection!
(ensure-unique-collection-name
(format "Questions for your \"%s\" dashboard" (:name dashboard)))
"#509EE3"
(rand-nth magic.populate/colors)
"Automatically generated cards.")]
(doseq [dashcard dashcards]
(let [card (some-> dashcard :card (assoc :collection_id (:id collection)) save-card!)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment