BookmarkSubscribeRSS Feed

[색상표] SAS에서 지원하는 색과 색상명2

Started ‎06-15-2020 by
Modified ‎06-15-2020 by
Views 114

* 출처 : 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;

 

2-1.png2-2.png2-3.png2-4.png2-5.png

 

Version history
Last update:
‎06-15-2020 01:56 AM
Updated by:
Contributors

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Article Labels
Article Tags