Last active
August 3, 2019 07:59
-
-
Save sebastibe/872df83ac328034fdbc4647700dbe756 to your computer and use it in GitHub Desktop.
Revisions
-
sebastibe revised this gist
Aug 3, 2019 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,4 +3,7 @@ (->> (subs s 1 7) (partition 2) (map clojure.string/join) (mapv #(js/parseInt % 16)))) (defn hex->rgba [s opacity] (into [] (conj (hex->rgb s) opacity))) -
sebastibe created this gist
Aug 3, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ ;; Hex to RBG (.i.e #63411E -> [99 65 30]) (defn hex->rgb [s] (->> (subs s 1 7) (partition 2) (map clojure.string/join) (mapv #(js/parseInt % 16))))