Skip to content

Instantly share code, notes, and snippets.

Created Jun 10, 2013
What would you like to do?
(defn hex-to-rgb
"Convert hex strings to rgb list. Ex: 'FF0000' -> (255 0 0)"
(let [ hex-pairs (partition 2 hex) ]
(for [p hex-pairs]
(java.lang.Integer/parseInt (apply str p) 16))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment