COLREP

Finds the color name associated with a color index
Operating state: SGOP

Syntax

CALL GASK('COLREP', color-index, color, return-code-variable);

Required Arguments

color-index
numeric constant; indicates the color index for which you want to check the color. Valid values are 1 to 256, inclusive.
color
character variable name; returns the color name associated with color-index.
return-code-variable
numeric variable name; returns the return code of the routine call. The return code can be 0, 4, 86, or 87. See Return Codes for DSGI Routines and Functions.

Details

The GASK('COLREP', . . . ) routine returns the predefined SAS color name associated with a color index. GASK('COLREP', . . . ) searches for the current color assigned to a color index in the following order:
  1. the color selected by the GSET('COLREP', . . . ) function.
  2. the COLORS= graphics option. If color-index is 2, the routine returns the second color from the color list of the COLORS= graphics option.
  3. the device's default color list found in the device entry. If color-index is 2, the routine returns the second color from the default color list.
See SAS Color Names and RGB Values in the SAS Registry for a list of SAS predefined color names.