         t0 (int t)
         t1 (if (>= (inc t0) s) 0 (inc t0))
         p  (- t t0)]
-    (blend t (nth colors t0) (nth colors t1))))
+    (blend-hsv t (nth colors t0) (nth colors t1))))
 
 
 ; TODO: less-angry rainbow!

  "Takes a color value and returns a vector containing the red, green, and blue
  component channels as floating-point numbers."
  [color]
  (vec (.getRGBColorComponents (Color. (unchecked-int color)) nil)))



  "Takes a color value and returns a vector containing the hue, saturation, and
  value components as floating-point numbers."
  [color]
  {:pre [(color? color)]}
  (let [c (Color. (unchecked-int color))]
    (vec (Color/RGBtoHSB (.getRed c) (.getBlue c) (.getGreen c) nil))))

