1 .TH palette n 1.0 Fgis "user Tcl commands"
4 palette \- Create and manipulate color palettes
7 \fB palette \fIoption\fR ?\fIarg\fR?
11 This command creates palette object, which is used for map visualisation. Palette is
12 array of 256 RGB color specifications, indexed by integers from 0 to 255.
13 Typically palette entry N is used for displaying map class N.
14 Upon creation of object new Tcl command with same name as object is defined
15 and can be used for manipulating palette. \fBpalette\fR command returns
16 name of created object. One palette, named \fBdefaultpalette\fR is created
17 during initialization of fGIS. In difference of user-created palettes it
22 \fBpalette read \fIfilename\fR
23 - reads palette from specified file. File should confirm EPPL7 clr file
26 \fBpalette parse \fIstring\fR
27 - reads palette from string. String should have same format as EPPL7 clr file.
29 \fBpalette set \fIlist\fR
30 - creates palette from list of color specification. Each element of list
31 should have format \#rrggbb. Color names are not supported by palettes.
32 Color specifications are assigned to palette indices in sequentual order.
35 - creates new palette with all entries set to white (#ffffff).
38 \fBpalette copy \fIpaletteName\fR
39 - creates a copy of existing palette. This allows to create modifable copy
42 Palette object names can be used as command names. They support folowing
45 \fIpaletteName\fB delete\fR -
46 destroys palette object.
48 \fIpaletteName\fB get\fI index\fR
49 - return color for given index in palette. Color is returned as \#rrggbb,
50 and can be used as color specification in Tk commands.
52 \fIpaletteName\fB list\fR
53 - return list of all colors in palette. This list always contains 256
54 elements. This list can be used as argument for \fBpalette set\fR command,
55 to create same palette.
57 \fIpaletteName\fB print\fR
58 - returns string, containing content of valid EPPL7 clr file, which can
59 be used to reproduce this palette.
61 \fIpaletteName\fB set\fI index value\fR
62 - changes contents of given entry to \fIvalue\fR. Value should be in form
63 \#rrggbb. Other forms of colors, supported by Tk are not supported by
66 .BR patterns (n), fgisRasterColorImage (n).