         xoffset (/ (* rwidth .1) 2) ; amount to offset the dots on x/y
         roffset (/ (* width .1) 12)
         cwidth (Math/floor (/ width amt)) ; circle width
-        crad (- (/ cwidth 2) roffset) ; circle radius
+        crad (- (* cwidth .85) roffset) ; circle radius
         cxs (mapv #(* cwidth %)
                   (drop 1 (take (+ 1 amt) (range)))) ; vector of x coords
         ]

(ns identikon-cljs.core
  (:require
   [cljs-hash.goog :as gh]
   [cljsjs.snapsvg]
   [cljsjs.svgjs]))

(enable-console-print!)

;; define your app data so that it doesn't get over-written on reload

(defn on-js-reload []
  ;; optionally touch your app-state to force rerendering depending on
  ;; your application
  ;; (swap! app-state update-in [:__figwheel_counter] inc)
  )

(defn log-str
  ([x]   (do (.log js/console (pr-str x)) x))
  ([m x] (do (log-str {:msg m :data x})   x)))

(log-str "hi" js/SVG)

(defn sha1 [str]
  (gh/sha1-hex str))

                  [y x])
     }))

(defn make-hsla [hue]
  "Create a string hex color from a hue, ex: #ff0000"
  (let [hsla (clojure.string/replace "hsla(_,80%,50%,1)" #"_" (str hue))]
    @(-> hsla col/css col/as-int24 col/as-css)))

(defn make-circle-zero [p triple xoff roff cr]
  "Large solid circle"
  (let [[x y hue] triple
        c (.circle p (- cr roff))
        hsla (make-hsla hue)]
    (.attr c (clj->js {:cx (- (+ xoff x) cr)
                       :cy (- (+ xoff y) cr)
                       :fill hsla}))))

(defn make-circle-one [p triple xoff roff cr]
  "Ring"
  (let [[x y hue] triple
        c (.circle p (- (- cr (/ cr 4)) roff))
        hsla (make-hsla hue)]
    (.attr c (clj->js {:cx (- (+ xoff x) cr)
                       :cy (- (+ xoff y) cr)
                       :fill "#fff"
                       :stroke-width (/ cr 4)
                       :stroke hsla}))))

(defn make-circle-two [p triple xoff roff cr]
  "Small solid circle"
  (let [[x y hue] triple
        c (.circle p (- (- cr (/ cr 3)) roff))
        hsla (make-hsla hue)]
    (.attr c (clj->js {:cx (- (+ xoff x) cr)
                       :cy (- (+ xoff y) cr)
                       :fill hsla}))))

(defn make-identikon [p ints hues]
  "Determine which circle to show by converting the int to mod 3"
