(palette-randomize-a! palette number)
This procedure is similar to palette-radomize-c!, but specifying an intended number of evently distributed areas. Therefore, there’s a logical minimum of 1.
The palette colormap is changed.
The palette colormap is returned and ready for interpolation.
> (define palette (palette-create))
palette
> (palette-randomize-a! palette 10)
#<colormap orow:-1 ocol:-1 xres:-1 yres:-1 w:65536 h:1>
> (palette-writepng palette "palette-rnd-areas.png")
ok
> (palette-interpolate! palette)
#<colormap orow:-1 ocol:-1 xres:-1 yres:-1 w:256 h:256>
> (palette-writepng palette "palette-rnd-areas-ip.png")
ok
>
The resulting palette displays as follows (note the pixels):
After linear interpolation this palette then displays as follows: