BookmarkSubscribeRSS Feed
gzr2mz39
Quartz | Level 8

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.

1 REPLY 1
Cynthia_sas
SAS Super FREQ

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 699 views
  • 0 likes
  • 2 in conversation