Date: Wed, 5 Sep 2007 07:56:04 -0700
Reply-To: webonomic <webonomic@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: webonomic <webonomic@GMAIL.COM>
Organization: http://groups.google.com
Subject: More Colors and Proc Print
Content-Type: text/plain; charset="iso-8859-1"
I have some test code below. I am doing a traffic light type of
approach and trying to color the background of the appropriate cell.
All is working well but I'd like to be able to use colors that don't
seem available to me.
Is there a way to use RGB or Hexidecimal colors or something else? Or
a way to make more colors available to the system?
I am using the following code:
data tempdata;
length Q1 $15;
input Site Q1 $ evaltot_Sum Red Amber Green;
cards;
3 Cleanliness 2 4 2 4
3 Friendliness 3 4 4 3
3 Responsiveness 3 4 4 3
3 Condition 3 4 4 3
3 Safety 3 4 4 3
4 Cleanliness 1 1 4 4
4 Friendliness 3 4 4 3
4 Responsiveness 3 4 4 3
4 Condition 3 4 4 3
4 Safety 3 4 4 3
9 Cleanliness 2 4 2 4
9 Friendliness 3 4 4 3
9 Responsiveness 3 4 4 3
9 Condition 3 4 4 3
9 Safety 1 1 4 4
;
run;
proc format;
picture bgcolor 3 = 'Green'
2 = 'Yellow'
1 = 'Red'
4 = 'Gray';
run;
ods html;
proc print data = tempdata noobs label;
var Q1;
var Red / style={background=bgcolor.};
var Amber / style={background=bgcolor.};
var Green / style={background=bgcolor.};
by Site;
label Red='R' Amber='A' Green='G' Q1='Services and Facilities';
run;
ods html close;