(palette-randomize-ca! palette number-of-colors number_of_areas)
This procedure distributes number_of_colors random color values among the palette which will form number_of_areas separate areas with the same width when interpolated.
The palette colormap is changed.
The palette colormap is returned and ready for interpolation.
> (define palette (palette-create))
palette
> (palette-randomize-ca! palette 5 10)
#<colormap orow:-1 ocol:-1 xres:-1 yres:-1 w:65536 h:1>
> (palette-writepng palette "palette-rand-ca.png")
ok
> (palette-interpolate! palette)
#<colormap orow:-1 ocol:-1 xres:-1 yres:-1 w:256 h:256>
> (palette-writepng palette "palette-rand-ca-ip.png")
ok
>
The resulting palette displays as follows (note the pixels):
After linear interpolation this palette then displays as follows: