   (let [r (/ (red color) 255.0)
         g (/ (green color) 255.0)
         b (/ (blue color) 255.0)
+        a (alpha color)
         min-val (min r g b)
         max-val (max r g b)
         l (/ (+ max-val min-val) 2.0)]

                g (- (+ 2.0 dr) db)  ; between cyan & yellow
                b (- (+ 4.0 dg) dr)) ; between magenta & cyan
            h (mod (* h 60.0) 360.0)]
        [h s v]))))

(defn hsv->rgb
  "HSV (Hue, Saturation, Value) to RGB conversion."
  [[h s v]]
  (if (zero? s)
    (coerce [v v v])
    (let [h (mod (/ h 60) 6)

  (let [r (/ (red color) 255.0)
        g (/ (green color) 255.0)
        b (/ (blue color) 255.0)
        a (alpha color)
        v (max r g b)
        d (- v (min r g b))]
    (if (zero? d)
