1 USING: math math.order kernel arrays byte-arrays sequences
2 colors.hsv benchmark.mandel.params ;
3 IN: benchmark.mandel.colors
5 : scale 255 * >fixnum ; inline
7 : scale-rgb ( r g b -- n ) [ scale ] tri@ 3byte-array ;
12 : <color-map> ( nb-cols -- map )
14 360 * swap 1+ / sat val
15 3array hsv>rgb first3 scale-rgb
18 : color-map ( -- map )
19 nb-iter max-color min <color-map> ; foldable