           r (* 255.0 (f (+ h 2)))
           g (* 255.0 (f h))
           b (* 255.0 (f (- h 2)))]
-      (coerce [r g b]))))
+      (coerce [r g b (or a 1.0)]))))
 
 (defn rgb->yuv
   "RGB to Y'UV (Luma, Chrominance) Conversion."

(ns inkspot.converter
  "Converters between RGB space and other colour spaces, inspired
   from python implementations from https://github.com/xav/Grapefruit"
  (:require [inkspot.color :refer [coerce red green blue]]))

(defn rgb->hsv
  "RGB to HSV (Hue, Saturation, Value) conversion."

  (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)
