(defmacro get-color [color-name]
`@(thi.ng.color.core/as-int32 (var-get (resolve (symbol "thi.ng.color.core"
(str '~color-name))))))
I like to avoid using the (var-get (resolve (symbol ... (str '~parem))))
. Something like thi.ng.color.core/(~color-name)
.
(I am using this macro in a very small personal project, and I don't care if it's really bad practice to create a macro for this use case. Though I like knowing why it would be problematic in bigger projects.)