Title | Previous | Next

colordef

Redefine a color in the MeshTV standard color table.

Synopsis:

colordef color_number (red green blue [scale [cname]]) | cname

Arguments:

color_number

An integer from 1 to 30 which indicates which color to replace in the MeshTV standard color table. Color Names There are 9 colors in the table that have predefined names, but other colors can be referenced using their color number.

red

The red component of the color. This is a floating point percentage between 0. and 1.If any numbers are larger than 1, then they are scaled relative to the largest of the three numbers in the trio such that the largest number in the trio becomes one. If the scale value is supplied and is greater than the largest number in the trio, then the numbers in the trio are divided by the scale.

green

The green component of the color. This is a floating point percentage between 0. and 1.If any numbers are larger than 1, then they are scaled relative to the largest of the three numbers in the trio such that the largest number in the trio becomes one. If the scale value is supplied and is greater than the largest number in the trio, then the numbers in the trio are divided by the scale.

blue

The blue component of the color. This is a floating point percentage between 0. and 1. If any numbers are larger than 1, then they are scaled relative to the largest of the three numbers in the trio such that the largest number in the trio becomes one. If the scale value is supplied and is greater than the largest number in the trio, then the numbers in the trio are divided by the scale.

scale

An optional numeric value used to scale the numbers in the rgb trio if any of the numbers are greater than one. If the scale value is not supplied then the numbers in the rgb trio are scaled relative to the largest of the three numbers in the trio. This value must be provided if the red, green, blue components have been specified and the cname argument is provided.

cname

The name of the color to define or look up.

MeshTV provides 9 standard named colors. These can be replaced via the colordef command. To create a color via an existing X Windows color name, omit all arguments except color_index and cname.

This command defines a color to be used for block, material ( bnd ), contour ( iso ), mesh , filled material ( smat ), and vec plots. The color is comprised of red, green, and blue components, and these are specified via a floating point number between 0 and 1. Numbers larger than one are scaled so that the largest value becomes one if the scale is not specified. This means that "colordef 1 0 0.5 1" is identical to "colordef 1 0 10 20" .

This command can be used to create custom color names that can be used with any commands that expect color names. To create a custom color name, all arguments must be specified. Colors can be redefined. Excluding the standard named colors, color names are only recognized in the window in which they were defined.

This command can be used to lookup colors in a list of defined colors. To find a list of defined colors available to MeshTV, look for the file: rgb.txt in the directory in which MeshTV was installed. If this command is being used to lookup a defined color, only the color_number and cname arguments are needed.

Note that if you are using the GUI and you issue this command in the command line interface window, the colors in the palette editor will no longer match the colors that you've specified in the command line interface window.

Examples:

#Set color 1 to aquamarine.

colordef 1 0.0 0.5 1.0

#Color 2 is the same aquamarine.

colordef 2 0 10 20

# Set color 30's rgb values and create the name "purple"

colordef 30 0.5 0. 1. 1. purple

# Set color 1 to PapayaWhip

colordef 1 PapayaWhip

colordef 1 "papaya whip"

See Also:

bnd , iso , mesh , smat , vec


Title | Previous | Next

MeshTV@viper.llnl.gov
Copyright © 1998, U.S. Department of Energy. All rights reserved.