I' m using the following colors but they are too bright. Are there any other mild shades for red, green and yellow to show on the report?
if diff_pct gt .9 then call define(_row_,'style','style=[background=lightgreen]');
if .6 le diff_pct le .9 then call define(_row_,'style','style=[background=yellow]');
else if diff_pct lt .6 then call define(_row_,'style','style=[background=lightred]');
SAS supports several color naming conventions.
If you want one that is human understandable use
Color Naming System which uses these keywords
Lightness
|
|
Saturation
|
Hue
|
---|---|---|---|
Black
|
|
Gray
|
Blue
|
Very Dark
|
|
Grayish
|
Purple
|
Dark
|
|
Moderate
|
Red
|
Medium
|
|
Strong
|
Orange/Brown
|
Light
|
|
Vivid
|
Yellow
|
Very Light
|
|
|
Green
|
White
|
|
You combine the keywords (except BLACK and WHITE, regardless of modifiers you get the same color)
Notice the use of "ish" with one hue value to modify another. Some won't make a lot of sense like "bluish_blue" but are not syntactically incorrect.
Experiment and have fun.
Or learn the CMYK, RGB, HSV, HLS and similar numeric codes. If you don't use these often when you see something like "cx123123" you may not remember what that means.
There are also the "standard" color names. You should be able to get a list of them running this code:
proc registry list startat="COLORNAMES"; run;
The log will show the color name followed by hex code values for the colors using RGB coding.
You can modify the registry list to include your list of names but unless you have an overriding need to use "BillsFavBlue" it may be more work to keep track of the code for when an update is needed than is worth it.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.