let genere_echelle_couleur ~(cmin:Graphics.color) ~(cmax:Graphics.color) ~(nb:int) =
let ccmin, ccmax = (array_ot_triple(from_rgb cmin), array_ot_triple(from_rgb cmax)) in
let gamma = [|
float_of_int(ccmin.(0)) +. (1.0 /. (float_of_int (nb + 1))) *. float_of_int(ccmax.(0) - ccmin.(0));
float_of_int(ccmin.(1)) +. (1.0 /. (float_of_int (nb + 1))) *. float_of_int(ccmax.(1) - ccmin.(1));
float_of_int(ccmin.(2)) +. (1.0 /. (float_of_int (nb + 1))) *. float_of_int(ccmax.(2) - ccmin.(2)) |] in
let echelle_resultat = Array.make nb cmin in
for i = 1 to nb do
echelle_resultat.(i-1) <- Graphics.rgb (abs(i * int_of_float(gamma.(0)))) (abs(i * int_of_float(gamma.(1)))) (abs(i * int_of_float(gamma.(2)))) ;
done;
echelle_resultat