Previous Page | Next Page

Graphics Options and Device Parameters Dictionary

COLORS



Specifies the foreground colors used to produce your graphics output if you do not specify colors explicitly in program statements.
Used in: GOPTIONS statement; GDEVICE procedure; GDEVICE Gcolors window
Default: device-dependent

Syntax
Details

Syntax

GOPTIONS: COLORS=<(colors-list | NONE)>
GDEVICE: COLORS=(<colors-list> )

colors-list

specifies one or more SAS color names. If you specify more than one color, separate each name with a blank. See SAS/GRAPH Colors and Images for information on specifying colors and using a color list.

To change some of the colors in the color list and retain others, you can use a null value for colors you do not want to change. For example, to change COLORS=(RED GREEN BLUE) to COLORS=(WHITE GREEN BROWN), you can specify COLORS=(WHITE,BROWN).

NONE

tells SAS/GRAPH to use only the colors that you explicitly specify in program statements and to ignore the device's default color list.

Note:   If you specify COLORS=(NONE) and omit a color specification for a graphics element, such as patterns, SAS/GRAPH selects at random one of the colors already specified in your program.  [cautionend]

Featured in: Example 3. Rotating Plot Symbols Through the Color List

Details

The order of the colors in the list is important when you use default colors. For example, the colors used for titles, axes, and surfaces in the G3D procedure are assigned by default according to their position in the color list.

Note:   Colors can be assigned to graph elements in different orders by different devices such as Java and ActiveX.  [cautionend]

If you omit or reset COLORS=, SAS/GRAPH uses the default color list for the current device. To explicitly reset the color list to the device default, specify either

goptions colors=;
goptions colors=();

If you use default patterns with a color list specified by COLORS= option, the patterns rotate through every color in the list. If the color list contains only one color, for example COLORS=(BLUE), the solid pattern is skipped and the patterns rotate through only the appropriate default hatch patterns for the graph.

Note:   By default, if black is the first color in a device's color list, default pattern rotation skips black as a pattern color, but uses black as the area-outline color. Thus, the outline color is never the same as an area's fill color. Using COLORS= to change the color list changes this default pattern behavior. When COLORS= is used, all colors in the specified color list are used in color rotation, and the outline color is the first color in the specified color list. Thus, the outline color will match any area using the first color as its fill.  [cautionend]

See PATTERN Statement for more information on pattern rotation.

Previous Page | Next Page | Top of Page