             (on-picker-click [event]
               (let [[x y :as pos] (get-mouse-pos own "colorpicker" event)
                     color (get-color own "colorpicker" pos)]
+                (draw-current-selection own color type event)
                 (callback {:hex color
                            :rgb (color/hex->rgb color)})))
             (on-bar-click [event]

    (add-watch local ::key
               (fn [_ _ o v]
                 (when (not= (:color o) (:color v))
                   (draw-color-gradient context1 type (:color v)))))

    (draw-color-gradient context1 type "#FF0000")

    (set! (.-src img) img-path)
    (let [key (events/listen img EventType.LOAD #(.drawImage context2 img 0 0))]
      {::key key})))

(defn- get-mouse-pos
  [own ref event]
  (let [canvas (mx/get-ref-dom own ref)
        brect (.getBoundingClientRect canvas)
        x (- (.-clientX event) (.-left brect))
        y (- (.-clientY event) (.-top brect))]
    [x y]))

(defn- get-color
  [own ref [x y]]

   {:picker {:width 165 :height 165}
    :bar {:width 15 :height 165 :img "/images/color-bar-options.png"}}})

(defn- get-mouse-pos
  [own ref event]
  (let [canvas (mx/get-ref-dom own ref)
        brect (.getBoundingClientRect canvas)
        x (- (.-clientX event) (.-left brect))
        y (- (.-clientY event) (.-top brect))]
    [x y]))

(defn- draw-color-gradient
  [context type color]
