*
;
*- This is calling one of Roland's macros -;
*- that will be used to do the graphics. -;
%rannomac
%let name=cxcolor1;
*- Output folder for the html page and gif -;
filename webout "C:\webtemp";
*- Note that swissb is being used as a font. -;
*- This is because if you use a true-type -;
*- font then it takes up some of the 255 -;
*- color palette slots to do anti-aliasing -;
*- and we need a lot of slots. -;
goptions reset=all transparency device=gif border
xpixels=1000 ypixels=900
hpos=49 vpos=39
htext=0.7 cell ftext=swissb
ctext=white cback=white
gsfmode=replace
;
*- This "ods listing close" stops a silly output -;
*- being done to where we don't want it. -;
ods listing close;
ods html path=webout body="&name..html";
data colorgrid;
length cxcolor ctext $ 8 r g b $ 2;
do r="00", "33", "66", "99", "CC", "FF";
do g="00", "33", "66", "99", "CC", "FF";
do b="00", "33", "66", "99", "CC", "FF";
cxcolor="CX"||r||g||b;
ctext="white";
if r="FF" or g="FF" or b="FF" then ctext="black";
output;
end;
end;
end;
drop r g b;
run;
data cxcolors;
retain holdy 39 xpos 0;
%dclannovars
set colorgrid;
if mod(_n_-1,6)=0 then holdy=holdy-1;
xpos=mod(_n_-1,6)*8+1;
%fillbar(x1=xpos,x2=xpos+7,y1=holdy-0.4,y2=holdy+0.4,fillcolor=cxcolor)
%text(x=xpos+3.5,y=holdy,text=cxcolor,color=ctext)
run;
proc ganno description=" " name="&name" annotate=cxcolors;
run;
proc greplay igout=work.gseg nofs;
delete &name;
run;
quit;
ods html close;
ods listing;