Tech Notes
A handy technical tip from Perry Watts (that's Perry rowing the boat in the photo below)
Working with RGB Codes to Match Your Logo - Perfectly Experts recommend that color be used sparingly and consistently in presentations. Graphs and text that match company logos are pleasing to the eye. Below is a list of steps for converting RGB (red-green-blue) decimal color codes from internet downloads to hexadecimals used by SASŪ. The NESUG 2008 logo is used in the example.
1) Download the logo from the NESUG web site by pressing the right mouse button and Save Picture As.
2) Double-click on the downloaded JPG file to bring up the Windows Pictures and Fax Viewer. Next, right-click and select edit. While in edit mode select a color by pressing the eyedropper tool over the blue sky.
3) Now press Colors>Edit Colors and then select Define Custom colors to bring up the slider tool with the supplied RGB decimal code. Don't define a color. Instead, record the displayed code and exit the application.
4) Go into PowerPoint and create a text box containing the recorded code. Alter the background color of the text box by selecting Format Text Box and then More Colors under Fill Color. Click on the Custom tab and re-enter the saved code in PowerPoint so that the fill color for the text box is turned into NESUG blue.
5) Copy and paste the newly colored text box into the same PowerPoint page and again select the Custom tab to bring up the slider bar. Move the slider bar to choose a lighter or darker shade of the same color. Save the RGB code and enter it into the changed text box.
6) Repeat steps 2-5 for each hue to come up with a table of text boxes containing related decimal RGB codes.
7) Run the SAS macro GETRGBHEXVAL to get the hexadecimal translations:
/* OPTIONS ENABLE COPYING OUTPUT
DIRECTLY FROM THE LOG WINDOW */
options NONOTES NOSOURCE;
%macro GetRGBHexVal(ColorDesc,rr,gg,bb);
%Local rgbhex;
/* SAS TRUNCATES BY DEFAULT */
%let rr=%sysfunc(round(&rr));
%let gg=%sysfunc(round(&gg));
%let bb=%sysfunc(round(&bb));
/* WHERE CODE TRANSLATION OCCURS */
%let RGBHEX =
%sysfunc(compress(CX%sysfunc(putn(&rr,hex2.))
%sysfunc(putn(&gg,hex2.))
%sysfunc(putn(&bb,hex2.))));
/* OUTPUT FROM THE MACRO FUNCTION */
%put %upcase(&ColorDesc);
%put
Decimal RGB = &rr.,&gg.,&bb HEX RGB = &RGBHEX;
%put;
%mend GetRGBHexVal;
/* MACRO CALLS */
%getRGBHexVal(NESUG BLUE, 4,152,214);
%getRGBHexVal(NESUG DARK BLUE, 3,134,190);
%getRGBHexVal(NESUG GOLD, 255,207,9);
%getRGBHexVal(NESUG DARK GOLD, 191,153,0);
8) Paste the output from the SAS LOG into a PowerPoint slide. The logo and color table has also been inserted into the slide along with a bar chart that uses the newly defined colors.
