* 출처 : http://cda.pinggu.org/view/21872.html;
filename clrname "d:\clrname.txt";
proc registry list
usesashelp
export = clrname
startat='COLORNAMES';
run;
data _colorname;
infile "D:\clrname.txt" firstobs=8 dlm='=';
length colorname $40. rgb $20.;
input colorname $ rgb $;
name = compress(colorname,'"');
white = name;
black=name;
red=name;
yellow=name;
blue = name;
rgb = "CX"||compress(substr(rgb,6),',');
label = rgb;
run;
Proc Sort Data=_colorname;
By rgb;
run;
data _colorname;
set _colorname;
seq = _n_;
run;
data _nameformat;
set _colorname;
start=name;
fmtname="clrname";
type='C';
run;
proc format cntlin=_nameformat;
run;
options orientation = portrait;
ods rtf file="d:\clor.rtf" style=rtf;
Proc Report Data=_colorname nowindows;
Column seq rgb white black red yellow blue;
Define seq/"#" style={cellwidth=50 just=center foreground=black background=whithe};
Define RGB/"#" style={cellwidth=125 just=center foreground=WHITE background=GREEN};
Define WHITE/"WHITE" style={cellwidth=200 just=center foreground=WHITE background=$CLRNAME.};
Define BLACK/"BLACK" style={cellwidth=200 just=center foreground=BLACK background=$CLRNAME.};
Define RED/"RED" style={cellwidth=200 just=center foreground=RED background=$CLRNAME.};
Define YELLOW/"YELLOW" style={cellwidth=200 just=center foreground=YELLOW background=$CLRNAME.};
Define BLUE/"BLUE" style={cellwidth=200 just=center foreground=BLUE background=$CLRNAME.};
run;
quit;
ods rtf close;
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!