portrait

Поиск



[software] [catdoc] [tcl] [geography] [old things]
Table of Contents

NAME

palette - Create and manipulate color palettes

SYNOPSIS

palette option ?arg ?

DESCRIPTION

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. palette command returns name of created object. One palette, named defaultpalette is created during initialization of fGIS. In difference of user-created palettes it cannot be modified.

OPTIONS

palette read filename
- reads palette from specified file. File should confirm EPPL7 clr file syntax.
palette parse string
- reads palette from string. String should have same format as EPPL7 clr file.
palette set list
- 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.
palette blank
- creates new palette with all entries set to white (#ffffff).

palette copy paletteName
- creates a copy of existing palette. This allows to create modifable copy of default palette.

OBJECT COMMAND

Palette object names can be used as command names. They support folowing options:
paletteName delete -
destroys palette object.
paletteName get index
- return color for given index in palette. Color is returned as #rrggbb, and can be used as color specification in Tk commands.
paletteName list
- return list of all colors in palette. This list always contains 256 elements. This list can be used as argument for palette set command, to create same palette.
paletteName print
- returns string, containing content of valid EPPL7 clr file, which can be used to reproduce this palette.
paletteName set index value
- changes contents of given entry to value . Value should be in form #rrggbb. Other forms of colors, supported by Tk are not supported by palettes.

SEE ALSO

patterns(n) ,fgisRasterColorImage(n) .


Table of Contents