Next: Color Chooser, Previous: Command Log, Up: Part I Goodies [Contents][Index]

### 6.3 Colormap

In a number of applications the user has to select a color from the colormap. For this a goody has been created. It shows the first 64 entries of the colormap. The user can scroll through the colormap to see more entries. Once the user presses the mouse one of the entries the corresponding index is returned and the colormap is removed from the screen. To display the colormap use the routine

    int fl_show_colormap(int oldcol);

`oldcol` should be the current or default color. The user can decide not to change this color by pressing the `Cancel` button in the form. The procedure returns the index of the color selected (or the index of the old color).