Table of Contents

Colormap manipulation utilities

Quick Contents of this Page

Overview

Palette is an interactive utility for manipulating colormaps, and savemap and loadmap are independent programs for saving and loading colormaps to/from a file. The colormap space of the SGI machine with full color has 4096 entries (see the online manual pages, e.g., man makemap). Palette, savemap, and loadmap treat it as 16 "sub-maps", each with 256 colors. These utilities are useful in conjunction with programs that operate in color space, but do not set up the colormap themselves (e.g., cpfg).

Palette

The program is invoked as:

palette

A window is displayed as in Figure 1, showing the 256 colors in the selected colormap, arranged as 16 columns, each representing 16 consecutive entries in the colormap. The hexadecimal numbers along the top of the window(0 to "f") indicate the 16 colormaps that may be selected by clicking the left mouse button while pointing at the desired number.

Figure 1 - A palette screen

Each color may be selected by clicking the left mouse button on the corresponding box. The 3 sliders above will immediately display the RGB values by filling the sliders with the proportional amount of red, blue and green. The color may be changed by manipulating the sliders using the mouse to point to the desired RGB levels and clicking the left button. Ramps can be created by clicking the first color using the left button, then the second using the middle button.

The popup menu

The palette popup menu is controlled using the right mouse button. The menu contains the following items:

Savemap and loadmap

Savemap:

A colormap may be saved to a file by invoking the savemap program. It is invoked as:

savemap [-cMapnr] filename

where
Mapnr is the colormap number (0 - 15),
filename is the name of the file to save the colormap to.

Note that no space between -c and Mapnr is allowed.

Loadmap:

A colormap saved using savemap may be loaded from a file by invoking the loadmap program. It is invoked as:

loadmap [-cMapnr] filename

where
Mapnr is the colormap number (0 - 15),
filename is the name of the file to load the colormap from.

Note that no space between -c and Mapnr is allowed.


Credits

P. Prusinkiewicz - palette implementation

I. Hernadi, P. Prusinkiewicz - palette documentation


Bugs

1. The file format is not compatible with the SGI utilities that have the same names.

2. The sliders used for RGB settings do not slide, rather they jump to the position selected by the mouse.

3. No space between -c and Mapnr is allowed.


Contact Information

Please direct all feedback, bug reports, and so on to vlab@cpsc.ucalgary.ca.

Last updated Feb. 27, 1996 by Istvan Hernadi