The SAS Output Delivery System and reporting techniques

re-create excel color

Reply
Regular Contributor
Posts: 196

re-create excel color

I would like to re-create the excel color with Hue=56, Sat=109, and Lum=185 (or Red=196, Green=215, and Blue=155).

I'm currently using tagsets.excelxp with style=journal.

Thank you.

SAS Super FREQ
Posts: 8,743

Re: re-create excel color

Hi:

  The easiest way to specify a color is with hexadecimal values. So, if you convert the RGB color numbers to hex values, then the specification would be something like this:

ods tagsets.excelxp ... ;

proc report data=sashelp.class

  style(header)={background=cxrrggbb};

...

run;

ods tagsets.excelxp close;

  Code sample below. For example, where I have cxrrggbb, you would have cxc4d79b.

cynthia

2508 data _null_;

2509 Red=196;

2510 Green=215;

2511 Blue=155;

2512 put red= hex2. green= hex2. blue= hex2.;

2513 colorval = catt('cx',put(red,hex2.), put(green,hex2.), put(blue,hex2.))

2513! ;

2514 put 'colorval for ods is ' colorval=;

2515 run;

Red=C4 Green=D7 Blue=9B

colorval for ods is colorval=cxC4D79B

Ask a Question
Discussion stats
  • 1 reply
  • 165 views
  • 0 likes
  • 2 in conversation