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
Diamond | Level 26

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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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