let chromatic start stop steps =
let now = ref start in
let fstep = float_of_int steps in
if fstep = 0. then fun () -> black
else
let inc_red = ref ((stop.c_red -. start.c_red) /. fstep) in
let inc_green = ref ((stop.c_green -. start.c_green) /. fstep) in
let inc_blue = ref ((stop.c_blue -. start.c_blue) /. fstep) in
fun () ->
now := {
c_red = incr_ccomp !now.c_red inc_red;
c_green = incr_ccomp !now.c_green inc_green;
c_blue = incr_ccomp !now.c_blue inc_blue;
};
!now