Skip to content

Commit

Permalink
Merge pull request #107 from powernoodle/color-cljs
Browse files Browse the repository at this point in the history
Fix CLJS compile errors
  • Loading branch information
noprompt committed Feb 27, 2016
2 parents 2dfadc1 + 98f9f43 commit 47c7ce6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/garden/color.cljc
Expand Up @@ -595,12 +595,14 @@
(-> hex
(string/replace #"^#" "")
(expand-hex)
(Long/parseLong 16)))
#?(:clj (Long/parseLong 16)
:cljs (js/parseInt 16))))

(defn- long->hex
"(long->hex 11189196) -> \"aabbcc\""
[long]
(Integer/toHexString long))
#?(:clj (Integer/toHexString long)
:cljs (.toString long 16)))

(defn weighted-mix
"`weight` is number 0 to 100 (%).
Expand Down

0 comments on commit 47c7ce6

Please sign in to comment.