next up previous contents
Next: Picking Items. Up: Display objects Previous: The .

Colors.

Colors in VMD are handled mainly by the ColorList object. This maintains a list of 16 unique colors in the VMD ``colormap'', as well as a color scale of 32 colors arranged in a selectable pattern of blue green red or blue white red. For each color there are two versions, a solid color and a semi-transparent color. Each color may be changed through user commands, and for each color there are corresponding material characteristics which are used when solid objects are drawn and the Displayable drawing the solid objects requests that materials be used. The ColorList also maintains several lists of names which are used to specify a color: using the NameList template, a set of color categories are stored in the ColorList, and for each color category there are any number of color objects, which consist of a name and index. For example, in the color category ``Stage'' there are two objects, an ``Even'' object (for the even-numbered stage checkerboard squares) and an ``Odd'' object (for the odd-numbered squares). The index for these objects indicates which of the 16 VMD colors to use to color that square. Displayble objects may request to have new categories created, and to add new color objects to each category. This capability is provided by the ColorUser class, from which each Displayable is derived, thus all objects can automatically access the colors through the functionality of the ColorUser class.



Justin Gullingsrud
Tue Apr 6 09:26:48 CDT 1999