(palette-randomize-c! palette number)
This procedure inserts random color pixels at the following positions:
The palette colormap is changed following the rules above.
The palette colormap is also returned and ready for interpolation.
> (define palette (palette-create))
palette
> (palette-randomize-c! palette 5)
#<colormap orow:-1 ocol:-1 xres:-1 yres:-1 w:65536 h:1>
> (palette-writepng palette "palette-rnd.png")
ok
>
The resulting palette displays as follows (note the pixels):
> (palette-interpolate! palette)
#<colormap orow:-1 ocol:-1 xres:-1 yres:-1 w:256 h:256>
> (palette-writepng palette "palette-rnd-ip.png")
ok
>
After linear interpolation the palette now displays as follows: