Color Naming System (CNS) Values

advertisement
Color Naming System (CNS) Values
With CNS, you specify a color value by specifying lightness, saturation, and hue, in that order, using the
terms shown in the following table.
Color Naming System Values
Lightness Saturation Hue
Black
Gray
Blue
Very Dark Grayish Purple
Dark
Moderate Red
Medium Strong
Orange/Brown
Light
Vivid
Yellow
Very Light
Green
White
Follow these rules when you are determining the CNS color name:
•
•
•
•
The lightness values black and white should not be used with saturation or hue values.
If not specified, medium is the default lightness value and vivid is the default saturation value.
Gray is the only saturation value that can be used without a hue.
Unless the color that you want is black, white, or some form of gray, you must specify at least
one hue.
One or two hue values can be used in the CNS color name. When using two hue values, the hues must
be adjacent to each other in the following list: blue, purple, red, orange/brown, yellow, green, and then
returning to blue. When two hues are used, the resulting color is a combination of both colors. Use the
suffix ish to reduce the effect of a hue when two hues are combined. Reddish purple is less red than red
purple. If you are using a color with an ish suffix, this color must precede the color without the ish suffix.
Color names can be written in the following ways:
•
•
•
without space separators between words
with an underscore to separate words
with a space to separate words, enclosed in quotation marks
For example, the following are all valid color specifications:
•
•
•
verylightmoderatepurplishblue
very_light_moderate_purplish_blue
“very light moderate purplish blue”
RGB Color Codes
The RGB color-naming scheme is usually used to define colors for a display screen. This colornaming scheme is based on the properties of light. With RGB color codes, a color is defined by
its red, green, and blue components. Individual amounts of each color are added together to
create the desired color. All the colors combined together create white. The absence of all color
creates black. Color names are in the form CXrrggbb, where:
•
•
•
•
CX indicates to SAS that this is an RGB color specification.
rr is the red component.
gg is the green component.
bb is the blue component.
The components are given as hexadecimal numbers in the range 00 through FF (0% to 100%),
where lower values are darker and higher values are lighter. This scheme allows for up to 256
levels of each color component (more than 16 million different colors). Common colors are
CXFF0000 (red), CX00FF00 (green), CX0000FF (blue), CXFFFF00 (yellow, a mix of red and
green), CXFF00FF (magenta, a mix of red and blue), CX00FFFF (cyan, a mix of green and
blue), CXFFFFFF (white, a mix of red, green, and blue), CX000000 (black, no color),
CXDDDDDD (very light gray), CX222222 (very dark gray), and so on.
Any combination of the color components is valid. Some combinations match the colors
produced by predefined SAS color names. For information about viewing the RGB combinations
that match predefined SAS color names, see Using the SAS Registry to Control Color in SAS
Language Reference: Concepts.
Download