## NAME

d.colormode - Allows the user to establish whether a map will be displayed using its own color table or the fixed color table of the graphics monitor.
(GRASS Display Program)

## SYNOPSIS

d.colormode
d.colormode help
d.colormode mode=name

## DESCRIPTION

d.colormode establishes what color table will be used to display maps to the graphics monitor.

### Parameters:

mode=name
  Options: fixed or float

Each time a new raster map layer is drawn on the screen, a color table associated with that map is loaded into the graphics display monitor. The command d.colormode mode=fixed requests that the monitor's color look-up table be fixed (i.e., static). The effect is that colors drawn on the screen by graphics calls will not change when subsequent maps are drawn to the screen. When the fixed option is used, the colors in the map's color table are mapped to the nearest colors available in the monitor's fixed color table. When the float option is used, the map's color table is loaded directly into the monitor's color look-up table.

There are advantages to using each color display mode. The d.display and d.colors programs allow the user to interactively modify the color tables of maps displayed to the graphics monitor. This is done by allowing the user to directly modify the monitor's color look-up table. Hence, to accommodate this option in d.display and d.colors, the float option is chosen. However, this option has the sometimes undesirable effect of changing the colors in which other maps are subsequently displayed to the graphics monitor (although it does not actually change the color tables of these latter maps). The float colormode is therefore best used when the user wishes to interactively change a map's color table, or when the user wishes to display one or more maps having the same color table. The fixed option allows any number of maps to be displayed to the screen, where each map uses different colors, but all use the same fixed color look-up table. You cannot toggle a map's color table when running in fixed mode.

This program will be run non-interactively if the user specifies the color mode on the command line (e.g., by typing d.colormode mode=fixed or d.colormode mode=float). Alternately, if the user simply types d.colormode on the command line, the program will prompt the user for the color mode using the standard GRASS parser interface.

## NOTES

Some devices support only a fixed color look-up. Whether or not XDRIVER supports float mode depends upon the X display in use; modes with more than 256 colors usually only support fixed mode. The number of color categories capable of being displayed is also device-dependent; if your colors fall outside this range when in float mode, they may not be displayed in the colors indicated in the map's color table file. However, the color table files themselves will accurately represent the user's changes.

Color table files associated with raster map layers are stored in the user's current mapset under the colr and colr2 directories.

## BUGS

It is strongly recommended that the user erase the graphics monitor screen (e.g., by running d.erase) immediately after changing the mode between fixed and float.

## SEE ALSO

d.colors,
d.colortable,
d.display,
d.erase,
d.rast,
parser

## AUTHOR

James Westervelt, U.S. Army Construction Engineering Research Laboratory

Last changed: $Date: 2003/08/20 08:10:12 $