.TH palette n 1.0 Fgis "user Tcl commands" .SH NAME palette \- Create and manipulate color palettes .SH SYNOPSIS \fB palette \fIoption\fR ?\fIarg\fR? .SH DESCRIPTION .PP This command creates palette object, which is used for map visualisation. Palette is array of 256 RGB color specifications, indexed by integers from 0 to 255. Typically palette entry N is used for displaying map class N. Upon creation of object new Tcl command with same name as object is defined and can be used for manipulating palette. \fBpalette\fR command returns name of created object. One palette, named \fBdefaultpalette\fR is created during initialization of fGIS. In difference of user-created palettes it cannot be modified. .SH OPTIONS .TP 4 \fBpalette read \fIfilename\fR - reads palette from specified file. File should confirm EPPL7 clr file syntax. .TP 4 \fBpalette parse \fIstring\fR - reads palette from string. String should have same format as EPPL7 clr file. .TP 4 \fBpalette set \fIlist\fR - creates palette from list of color specification. Each element of list should have format \#rrggbb. Color names are not supported by palettes. Color specifications are assigned to palette indices in sequentual order. .TP 4 \fBpalette blank\fR - creates new palette with all entries set to white (#ffffff). .TP 4 \fBpalette copy \fIpaletteName\fR - creates a copy of existing palette. This allows to create modifable copy of default palette. .SH OBJECT COMMAND Palette object names can be used as command names. They support folowing options: .TP 4 \fIpaletteName\fB delete\fR - destroys palette object. .TP 4 \fIpaletteName\fB get\fI index\fR - return color for given index in palette. Color is returned as \#rrggbb, and can be used as color specification in Tk commands. .TP 4 \fIpaletteName\fB list\fR - return list of all colors in palette. This list always contains 256 elements. This list can be used as argument for \fBpalette set\fR command, to create same palette. .TP 4 \fIpaletteName\fB print\fR - returns string, containing content of valid EPPL7 clr file, which can be used to reproduce this palette. .TP 4 \fIpaletteName\fB set\fI index value\fR - changes contents of given entry to \fIvalue\fR. Value should be in form \#rrggbb. Other forms of colors, supported by Tk are not supported by palettes. .SH SEE ALSO .BR patterns (n), fgisRasterColorImage (n).