The following palette formats are discussed in this section:
Default False Color Map File Format
Default Part Color File Format
A function palette file is saved using the Function Editor when you save (one or more) function color palettes. The file stores the combination of a color table along with its variable mapping. The following is an example function palette file:
palette 'velocity' variable_type vector variable 'velocity' type continuous limit_fringes no scale linear number_of_levels 5 colors 0.000000 0.000000 1.000000 0.000000 1.000000 1.000000 0.000000 1.000000 0.000000 1.000000 1.000000 0.000000 1.000000 0.000000 0.000000 values 0.100341 0.301022 0.501704 0.702385 0.903067
Many lines of the file consist of a descriptive keyword followed by an appropriate value. In other areas the keyword is used to start a block of information. The values are all free format real or integer numbers or string constants. The palette name must have single quotes around each name. The string keywords and constant values must match exactly.
Keyword | Description |
---|---|
palette |
Name of the palette
when one name is present. Name of the subpalette
when two names are present (for example,
|
variable |
Name of the variable used with the palette. |
variable_type |
Type of the variable, scalar or vector. |
limit_fringes |
Indicates if the
palette is set up for limiting fringe. If it is,
the options are |
scale |
Indicates whether the palette scale is linear, logarithmic, or quadratic. |
number_of_levels |
Indicates the number of levels defined for the palette. |
colors |
Indicates the start of a block of RGB triplets, 1 triplet per line. There will be the same number of lines as there are levels. |
values |
Indicates the start of a block of level values. There will be the same number of values as there are levels. |
When EnSight starts, it looks for user defined function color palettes located under $CEI/ensight251/site_preferences/palettes and in the palettes subdirectory under the user's EnSight private preferences directory (see the section introduction for directory location specifics). These files must be named palette_name.cpal, where the palette_name is the name of the color palette in the Files area of the Palette editor dialog.
The format of the .cpal file is as follows:
Line 1: The string
number_of_levels x
, wherex
is an integer <= 21.Line 2: The string
colors
Line 3 through x + 2: Three float values in range 0.0 to 1.0, indicating red, green, and blue color components.
Line x+3: has an optional keyword:
undef_color
Line x+4 has a float triplet of red, green, blue that is the undefined color.
Line x+5 has an optional keyword:
alpha
Line x+6 through 2x+6 has one float between 0.0 and 1.0 inclusive representing the alpha (opacity) value
An example color palette file without undefined color nor alpha values:
number_of_levels 5 colors .008 0. 0. .5 0. 0. 1. 0. 0. 1. 1. 0. 1. 0. 1.
An example color palette file with undefined color and alpha values:
number_of_levels 5 colors .008 0. 0. .5 0. 0. 1. 0. 0. 1. 1. 0. 1. 0. 1. undef_color 0.7 0.7 0.7 alpha 1.0 0.25 0.1 0.25 1.0
This file defines the default false-color map color range that is assigned by EnSight to each palette when variables are activated. If EnSight does not find a definition file, it uses an internal default list. If, however, EnSight does find a file at start-up, EnSight will read your colors as the default color palette colors. The file must be called ensight.false_color.default and be located in the user's private preferences directory (see the section introduction for path specifics).
The format of the ensight.false_color.default file is as follows:
An example default file can be found in:
$CEI/ensight251/site_preferences/ensight.false_color.default on your client system.
The following is an example default false color map file with 5 colors; blue, cyan, green, yellow, and red:
Version 6.0 5 0. 0. 1. 0. 1. 1. 0. 1. 0. 1. 1. 0. 1. 0. 0.
This file defines default Constant Colors that are assigned (and cycled through) by EnSight when parts are built.
Note: If legacy EnSight does not find a definition file it uses an internal default list.
The Ansys installed EnSight will have a file called ansys.part.colors.default in the EnSight install and will use a default part color scheme consistent with Ansys products. If, however, EnSight does find a file in the user's private preferences directory (see the section introduction for path specifics) then it will be used instead. The file must be called ensight.part.colors.default for an EnSight legacy install, or ansys.part.colors.default for an Ansys EnSight install.
The format of the part constant color file is as follows:
Line 1: Version 6.0
Note: This need not match EnSight's version number.
Line 2: One integer, the number of default part colors
Line 3 on: three floats (each ranging between 0. and 1.), the (red, green, blue) color triplet of each color, each listed on separate lines.
An example default file can be found in:
$CEI/ensight251/site_preferences/ensight.part.colors.default on your client system.
The following is an example default part colors file with 6 colors (blue, cyan, green, yellow, red, and magenta):
Version 6.0 6 0. 0. 1. 0. 1. 1. 0. 1. 0. 1. 1. 0. 1. 0. 0. 1. 0. 1.