| SAS/GRAPH Software: Reference |
The valid color-naming schemes are
For the CMYK color scheme, color specifications must
be enclosed in quotation marks. For all other color schemes, the quotes are
optional.
You can freely intermix color-naming schemes in your
programs; however, depending on your device capabilities, the color that is
displayed may not be the color that you expect. See Device Capabilities for information
on how to tell if your device supports user-defined colors.
Note:
The colors shown in the output in this book may be different from the colors
you see on your device. ![[cautend]](../common/images/cautend.gif)
You can use the RGB color-naming scheme to specify a color in terms of its
red, green, and blue components. Color names are of the form CXrrggbb, where
The components are given as hexadecimal
numbers in the
range 00 through FF. This allows for up to 256 levels of each color component.
For example, bright red is specified as CXFF0000, white as CXFFFFFF, black
as CX000000, and green as CX00FF00.
Any combination of the color components is valid. Some
combinations will match the color produced by predefined SAS color names.
Refer to Predefined SAS Colors That Can Be Used in SAS/GRAPH Software
for those combinations that match predefined SAS color names.
To
use a printer's Pantone Color Look-Up Table, you can use the CMYK color-naming
scheme to specify colors in terms of their cyan, magenta, yellow, and black
components. Color names are of the form 'ccmmyykk', where
The components are given as quoted
hexadecimal numbers
in the range 00 through FF. This scheme allows for up to 256 levels of each
color component. For example, red is specified as '00FFFF00', green as 'FF00FF00',
process black (uses cyan, magenta, and yellow ink) as 'FFFFFF00', and pure
black (uses only black ink) as '000000FF'. For CMYK color specifications,
the quotes are required.
CMYK color specifications should only be used for devices
that support four colors. If a CMYK color is used on a three-color device,
the color specification will be mapped to a color that the device supports,
but the resulting colors may not be appealing. Moreover, different CMYK colors
may map to the same device color because a four-color space supports more
colors than a three-color space.
You can use the HLS color-naming scheme to specify colors in terms of hue,
lightness, and saturation components. SAS/GRAPH
software uses an HLS color scheme that is modeled directly after the Tektronix
Color Standard, which is shown in Tektronix Color Standard. HLS color names are of the form
Hhhhllss, where
The components are given as hexadecimal numbers. The
hue component has the range 000 through FFF. Valid values are 000 through
360 (168 base 16). If the value for the Hue is greater than 360 (168 base
16), the Hue will be calculated by using modular arithmetic with a modulus
of 360 (168 base 16). Both the lightness and saturation components are hexadecimal
and have the range 00 through FF. Thus, they provide 256 levels for each component.
For example, bright blue is specified as H14066FF and light gray as H000BB00.
White is defined as Hxxx FF00 and black as Hxxx
0000, where xxx can be any hue. For white and black, the lightness
component determines the intensity of the gray level. When the saturation
is zero, the color is a shade of gray that is determined by the lightness
value.
Any combination of the color components is valid. Some
combinations will match the color produced by predefined SAS color names.
Refer to Predefined SAS Colors That Can Be Used in SAS/GRAPH Software
for those combinations that match predefined SAS color names.
Tektronix Color Standard
You can use the HSV color-naming scheme to specify colors in terms of hue,
saturation, and value (or brightness) components. HSV color names are of the
form Vhhhssvv, where
The components are given as hexadecimal numbers. The
hue component has the range 000 through FFF. Valid values are 000 through
360 (168 base 16). If the value for the Hue is greater than 360 (168 base
16), the Hue will be calculated by using modular arithmetic with a modulus
of 360 (168 base 16). Both the saturation and value (brightness) components
are hexadecimal and have the range 00 through FF (when the saturation is zero,
the color is a shade of gray determined by the value). Thus, they provide
256 levels for each component.
For example, bright blue is specified as V0C8FFCC, light
gray as Vxxx00BB, and White as Vxxx00FF, where xxx can be any hue. For white and black, the value component determines
the intensity of gray level. Any combination of the color components is valid.
You can use gray scales to specify colors in terms of gray components. Gray-scale
color names are of the form GRAYll. The value ll
is the lightness of the gray and is given as a hexadecimal number in the range
00 through FF. This scheme allows for 256 levels on the gray scale. For example,
GRAYFF is white, GRAY00 is black, and GRAY4C is a dark gray.
To specify colors in intuitive terms, use the predefined SAS color names,
which form a color by combining the abbreviations for prefixes and prefix
hues with the abbreviations for the names of several common hues. See Abbreviations for Hues and Prefixes Used in Predefined SAS/GRAPH Color Names.
Predefined SAS color names follow the formulas
prefix+hue, prefix+hue+hue, or prefix+hue+hue+hue. For example, the common hue red
can be denoted by R. The common
prefixes grayish and dark can be denoted by GR and DA. To construct the color
dark grayish red, combine the prefix DA, the prefix hue GR, and the hue R
to form the predefined SAS color DAGRR. The predefined colors are approximations
only and may not produce the same results on different devices.
Generally, to describe a predefined SAS color name that
uses more than one hue, add the suffix ish to the name of each
prefix hue. In the previous example, the color name from the prefix dark and
the hues gray and red is described as dark grayish red (DAGRR).
Not all combinations of prefixes and hues are available
as predefined SAS color names. You can specify colors that do not have a predefined
SAS color name by using the RGB, HLS, HSV, CMYK, or gray-scale color-naming
schemes.
Predefined SAS Colors That Can Be Used in SAS/GRAPH Software
provides a comprehensive list of the predefined SAS color names that you can
use. The table lists the predefined SAS color name followed by the description
and the equivalent RGB and HLS values.
Note:
Hardware
characteristics may cause some colors with different color definitions to
appear the same. Also, the same predefined color is likely to appear different
on different devices and may not appear correct on some devices. ![[cautend]](../common/images/cautend.gif)
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.