Skip to content

Instantly share code, notes, and snippets.

@nbeloglazov
Created August 12, 2010 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nbeloglazov/521623 to your computer and use it in GitHub Desktop.
Save nbeloglazov/521623 to your computer and use it in GitHub Desktop.
(import 'java.awt.Color)
(defn color-names []
(->> Color
.getFields
(map #(.getName %))
(drop-last 3)
(filter #(= % (.toUpperCase %)))))
(defn get-color [name]
(eval (symbol (str "Color/" name))))
(zipmap (color-names)
(map get-color (color-names)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment