1 USING: math math.order kernel arrays byte-arrays sequences
2 colors.hsv accessors colors fry benchmark.mandel.params ;
3 IN: benchmark.mandel.colors
5 : scale ( x -- y ) 255 * >fixnum ; inline
7 : scale-rgb ( rgba -- n )
8 [ red>> scale ] [ green>> scale ] [ blue>> scale ] tri 3byte-array ;
13 : <color-map> ( nb-cols -- map )
16 1 <hsva> >rgba scale-rgb
19 : color-map ( -- map )
20 max-iterations max-color min <color-map> ; foldable