This procedure performs a linear interpolation between all known color entries in a palette.
The palette colormap is changed accordingly by filling all gaps by linear interpolation.
The modified palette colormap is also returned.
This example interpolates an empty palette (resulting in a gray gradient from “almost black” to full white):
> (define p (palette-create)) p > (palette-interpolate! p) #<colormap orow:-1 ocol:-1 xres:-1 yres:-1 w:65536 h:1> > (palette-writepng p "interpolated-palette.png") ok >
The resulting palette of this example displays as follows (stored with “folded” dimensions 256x256):