1 let f = "0123456789abcdef"
3 let r, g, b = 1.0, 0.5, 0.0
7 let mk_h x = x +. (1. -. x) *. h
9 let rr, gg, bb = mk_h r, mk_h g, mk_h b
12 let x = int_of_float x in
13 print_char f.[x / 16]; print_char f.[x mod 16]
16 mk_f (rr *. 255.); mk_f (gg *. 255.); mk_f (bb *. 255.);