![]() Chapter Contents |
![]() Previous |
![]() Next |
| RGBDM |
| Category: | Utility |
| Syntax | |
| Details | |
| Example |
Syntax |
| DM-color-name=RGBDM(color-name<,RGB-color>); |
Type: Character
Type: Character
Note: This parameter is an update parameter. See Input, Output, and Update Parameters for more
information. ![[cautionend]](../common/images/cautend.gif)
Type: Character
| Details |
The RGBDM function provides a way to determine both the closest color that is supported by the SAS windowing environment for a specified color and the RGB values for a color name. If color-name is a variable and the specified color is a valid color abbreviation, the variable is updated with the complete color name. For example, the color "R" would be translated to "RED" and the RGB-color would be "CXFF0000". The value for RGB-color may be different depending on the host operating system.
For more information about the CXrrggbb format, see SAS/GRAPH Software: Reference.
| Example |
Display the color components of several different colors:
length rgbclr $ 8;
INIT:
/* display txtclr=red */
/* rgbclr=cxff0000 */
txtclr = rgbdm("RED", rgbclr);
put txtclr= rgbclr=;
/* display txtclr=red */
txtclr = rgbdm("cxf00000");
put txtclr=;
/* display txtclr=red clr=red */
clr='r';
txtclr = rgbdm(clr);
put txtclr= clr= ;
/* display the foreground */
/* color in rgb values */
txtclr = rgbdm("FOREGROUND", rgbclr);
put txtclr= rgbclr=;
return;
In some operating environments, this example produces the following
output:
txtclr=RED rgbclr=CXFF0000 txtclr=RED txtclr=RED clr=RED txtclr=WHITE rgbclr=CXF2F2F2
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.