Selecting "Edit palette" from the Palette menu produces the Palette Editor.
Each color square is a button. You can select a color square by pressing the mouse button over it. The name of the selected color is displayed at the bottom of the Palette Editor window.
Removing colors
The "Remove" button removes the currently selected color from the palette. If that color was being used in the pixmap, it is replaced by the background color.
Adding colors
Pressing the "New" button adds a color to the end of the palette. The new color is the same as the last color on the palette.
Editing colors
To change a color, double click over it or select it and press "Edit". This invokes the color Editor.
Transparent colors
If you set the toggle labelled "Transparent" for a selected color, the color will be "transparent" in the pixmap. This means that when the pixmap is displayed in the final application those areas of the pixmap which are transparent show the colour that is beneath them. You may wish to use this so that the background of a button, for example, shows through parts of the pixmap.
Note, however, that it is XPM that supports transparent colors. The Motif PushButton and Label widgets provide no support for them. You could use the XPM library to translate the "none" color to the background color of the widget displaying the pixmap. The following file provides more detailed information on using the XPM library:
$VISUROOT/contrib/xpm/doc/xpm.ps
where VISUROOT is the install directory of your WorkShop Visual.
If you wish to use transparent colors, some third-party widgets may provide more support.
The name "none" is displayed for the transparent color in the color palette editor.
Saving a color palette
A color palette is saved with the pixmap to which it is attached. There are, however, two options regarding color palettes when saving a pixmap: