Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Convert hex color values to rgb clojure
(defn css-color [color]
(let [ colors (rest (clojure.string/split color #""))
red (take 2 colors)
green (take 2 (drop 2 colors))
blue (take 2 (drop 4 colors))]
(map #(-> (conj % "0x") (clojure.string/join) (read-string)) [red green blue])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.