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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 715 views
  • 0 likes
  • 2 in conversation