Customizing Color Ramps
Color ramps are used in Maestro to map volume data onto a surface. In addition to the default color ramps provided with Maestro, you can also create your own color ramps.Each of the standard color ramps is defined in a separate file. These ramp files are stored in the in the ramps subdirectory of the installation resources directory.
By convention, color ramp files have the extension .rmp. The color ramps are called by Maestro using the file ramp.res, which is stored in the installation resources directory.
To define your own color ramps:
-
Create a
ramp.resfile in your Maestro user resources directory, or copyramp.resfrom the installation resources directory and edit it. -
Create a
rampssubdirectory in your Maestro user resources directory. -
Create color ramp files
ramp.rmpin therampssubdirectory, or copy the.rmpfiles from therampssubdirectory of the installation resources directory and edit them.
The ramp.res file contains a three-line description of each ramp. The three lines contain the following information:
- The short name of the color ramp (used in Maestro commands)
- The long name of the color ramp (used in the Surface Display Options Dialog Box of the Surface Manager Panel, for example)
- The name of the file that contains the ramp definition
Lines beginning with a # are comment lines. Only the short name can be used to refer to the color ramp when using the surfacescheme colorramp=ramp-name command in Maestro.
The color ramp files contain a list of color names, in the order that they will be used in the color ramp. The names of the colors must be taken from the colors.res file in the installation. Color names must be a single token (there must be no spaces). If the color names do have an embedded space, they must be quoted (for example, "spring green"). Lines beginning with a # are comment lines. The following example defines a simple 5-color ramp:
# Number of colors
# 5
# Color names for all colors of this color ramp
red
orange
yellow
green
blue
When a color ramp is applied, the range of values that define the ramp is divided evenly between the colors. The first color on the list is applied to the most negative value, the last color to the most positive. If you want to extend the range of values mapped to a single color, you can duplicate the color in the list. For example, to extend the range for the endpoints in the above example, you could duplicate red and blue, as follows:
# Number of colors
# 7
# Color names for all colors of this color ramp
red
red
orange
yellow
green
blue
blue