set rgb

This command allows the user to define a new color within GrADS. Beginning with GrADS version 2.1, controls were added for color transparency and for pattern filling.

Syntax

set rgb color# R G B             (GrADS version 2.0* and earlier)


set rgb color# R G B <A>         (GrADS version 2.1+)
... or ...
set rgb color# tile tile#        (GrADS version 2.1+, used only for pattern filling. See the set tile command for more information.)

where:

The new color is referred to by its color# in any GrADS command that allows specification of colors.

Usage Notes

  1. For GrADS version 2.0.a5 and earlier, the color# must be between 16 and 99 -- 0 to 15 are predefined.
    For GrADS versions 2.0.a6 through 2.0.2, the maximum number of colors increased from 99 to 255.
    Starting with version 2.1, the maximum number of colors is 2047.

  2. The GrADS metafile-to-postscript translator gxps will make use of any new color settings although the output colors will be printer-dependent and should be checked for the desired rendering. When converting new color settings into grayscales, gxps will translate the GREEN intensity ONLY into a new greyscale value. Note that gxps does have a predefined mapping between color values from 0 to 15 such that the predefined rainbow sequence is rendered into a fairly pleasing greyscale gradation; this cannot be done for newly defined colors.

  3. For more details on using defined colors, see the section in the User's Guide on controlling colors in GrADS.

Examples

set rgb 50 200 200 200

Defines a new color number, 50, and assign a color to it. In this case, the color would be a light gray.