SAS provides predefined color names that can be used in SAS/GRAPH software and ODS Graphics procedures to control the appearance of graphs, titles, annotations, and other output elements. These colors can be specified using predefined SAS color names or RGB color values.
A comprehensive list of predefined SAS/GRAPH color names is available in the SAS/GRAPH color list PDF document.
The color list contains three columns:
Although all three formats can be used, SAS recommends using either:
HLS color specifications are less commonly used.
Example
To specify the color Brilliant Orange in a TITLE statement, use either the RGB value or the predefined SAS color name.
Using the RGB color value:
title1 color=CXD9892B height=2 'This is my title';
Using the predefined SAS color name:
title1 color=BIO height=2 'This is my title';
Both statements produce the same color.
In addition to the predefined SAS/GRAPH color list, SAS maintains additional named colors in the SAS Registry.
To display these color definitions, submit the following code and review the output written to the SAS log:
proc registry list startat='\COLORNAMES\HTML';
run;
The output includes additional named colors that can be referenced in SAS programs.
When a color name is present in both lists, the RGB value stored in the registry overrides the RGB value associated with that color name.
For more information about working with colors in SAS, see the SAS/GRAPH 9.4 Reference Guide, specifically:
Using Colors in SAS/GRAPH Programs under the section Controlling the Appearance of Your Output.
This documentation provides detailed information about color specifications, color models, and techniques for customizing graphical output in SAS.