For a two-dimensional array, the fastest varying dimension contains three elements that define (in order) the red, green, and blue components of a single color. Each component should be within the range 0.0 through 1.0 inclusive. If the red component of a color is specified with a negative number, then the color is considered to be a missing value, and that index of the colormap will default. In all other cases, an error message will be generated if values are outside the range of 0.0 through 1.0 inclusive.
For an array of color specification formats, each element must be enclosed in double quotes and be either an RGB triplet as described above, or a named color from the $NCARG_ROOT/lib/ncarg/database/rgb.txt file.
For a pre-defined colormap name, set the resource to one of the following pre-defined colormap names:
If you do not set wkColorMap, the Workstation object will use a default color map. The first triple of the wkColorMap array (index 1 of the slow-varying dimension using the Fortran interface, or index 0 using the C interface) is the background color for the Workstation and is accessed as HLU color index 0. In the default colormap, the color is dynamically determined based on the Workstation subclass. For example, the background color for the XWorkstation is black, but the background color for the PSWorkstation is white. The background color can also be set using the wkBackgroundColor resource as a convenience.
The second triple of the wkColorMap array (index 2 of the slow-varying dimension using the Fortran interface, or index 1 using the C interface) is the foreground color for the Workstation and is accessed as HLU color index 1. The foreground color is also dynamically determined. It defaults to either white or black, whichever is determined to contrast more with the background color.
NhlBACKGROUNDwhen using the C language interface). If defining this resource with an RGB triplet, each element must be in the range 0.0 through 1.0 inclusive. If any element is invalid, the Workstation object issues a warning, and reverts to the default background color value.
Default: (0.0, 0.0, 0.0) (Black)
NhlFOREGROUNDwhen using the C language interface). It is the first element of the wkColorMap array (index 0 of the array when using the C interface). Unlike wkBackgroundColor, you may set wkForegroundColor at any time during the life of the Workstation object.
If you set wkForegroundColor and wkColorMap at the same time, the set value of the first element of wkColorMap will be replaced with the value of wkForegroundColor. If neither wkForegroundColor nor wkColorMap is set when the Workstation object is created, the foreground is determined dynamically.
If background color is determined to be closer to black than white, the foreground color is set to white (1.0, 1.0, 1.0); otherwise the foreground color is set to black (0.0, 0.0, 0.0).
This value is determined by the low-level GKS library.
NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?