<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Output the SAS/GRAPH colors for an ODS STYLE to a data set in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-the-SAS-GRAPH-colors-for-an-ODS-STYLE-to-a-data-set/m-p/24688#M4127</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Absolutely helps Cynthia. Thx!. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need the values in a macro variable for a stored process and the following code does this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename colors catalog 'work.tempfile.tempfile.source';&lt;/P&gt;&lt;P&gt;proc template;&lt;/P&gt;&lt;P&gt;&amp;nbsp; source styles.analysis /store=sashelp.tmplmst&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file=colors;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt; retain colorList;&lt;/P&gt;&lt;P&gt; length colorlist $256;&lt;/P&gt;&lt;P&gt; infile colors;&lt;/P&gt;&lt;P&gt; input;&lt;/P&gt;&lt;P&gt; if index(_infile_,"'gdata");&lt;/P&gt;&lt;P&gt; color = strip(scan(_infile_,2,'='));&lt;/P&gt;&lt;P&gt; color = '#' || substr(color,3,6);&lt;/P&gt;&lt;P&gt; /* create a cumulative list of colors */&lt;/P&gt;&lt;P&gt; colorList = catx(' ',colorList,color);&lt;/P&gt;&lt;P&gt; /* update a macro var with the new list of values */&lt;/P&gt;&lt;P&gt; call symputx('colorList',colorList);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%put &amp;amp;colorList;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will likely not run this code as part of the stored process. I will tweak it a bit an save a data set with one obs per style with the list of colors. My stored process can then use that data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx again!!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Mar 2012 13:00:56 GMT</pubDate>
    <dc:creator>DonH</dc:creator>
    <dc:date>2012-03-08T13:00:56Z</dc:date>
    <item>
      <title>Output the SAS/GRAPH colors for an ODS STYLE to a data set</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-the-SAS-GRAPH-colors-for-an-ODS-STYLE-to-a-data-set/m-p/24684#M4123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I run, for example, PROC GCHART, and use different ods styles, I get different colors. Is there a way to output to a data set the color list for a specific ODS STYLE?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2012 01:35:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-the-SAS-GRAPH-colors-for-an-ODS-STYLE-to-a-data-set/m-p/24684#M4123</guid>
      <dc:creator>DonH</dc:creator>
      <dc:date>2012-03-08T01:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Output the SAS/GRAPH colors for an ODS STYLE to a data set</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-the-SAS-GRAPH-colors-for-an-ODS-STYLE-to-a-data-set/m-p/24685#M4124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Don:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Generally, if you look at a style template, you will see all the colors (GraphColors or Colors) in a color list at the top of the template. Mostly the colors will be of the form cxRRGGBB (as hex values). The colors are set up in a list of attributes and color values, so you would see something like this (pasted from ANALYSIS style):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;style GraphColors / &lt;/P&gt;&lt;P&gt;'gablock' = cxFFFDF7 &lt;/P&gt;&lt;P&gt;'gblock' = cxEEF4EE &lt;/P&gt;&lt;P&gt;'gcclipping' = cxDC531F &lt;/P&gt;&lt;P&gt;'gclipping' = cxE7774F &lt;/P&gt;&lt;P&gt;'gcstars' = cx588458 &lt;/P&gt;&lt;P&gt;'gstars' = cxB3D2B3 &lt;/P&gt;&lt;P&gt;'gcruntest' = cxE7774F &lt;/P&gt;&lt;P&gt;'gruntest' = cxE6E6CC &lt;/P&gt;&lt;P&gt;'gccontrollim' = cxCCCC97 &lt;/P&gt;&lt;P&gt;'gcontrollim' = cxFFFFE3 &lt;/P&gt;&lt;P&gt;'gdata' = cxB3D2B3 &lt;/P&gt;&lt;P&gt;'gcdata' = cx588458 &lt;/P&gt;&lt;P&gt;'goutlier' = cx000000 &lt;/P&gt;&lt;P&gt;'gcoutlier' = cx000000 &lt;/P&gt;&lt;P&gt;'gfit2' = cxD18000 &lt;/P&gt;&lt;P&gt;'gfit' = cx678D67 &lt;/P&gt;&lt;P&gt;'gcfit2' = cxD18000 &lt;/P&gt;&lt;P&gt;'gcfit' = cx678D67 &lt;/P&gt;&lt;P&gt;'gconfidence2' = cxF5DAC1 &lt;/P&gt;&lt;P&gt;'gconfidence' = cxDEDBC8 &lt;/P&gt;&lt;P&gt;'gcconfidence2' = cx9F8777 &lt;/P&gt;&lt;P&gt;'gcconfidence' = cxA5A18F &lt;/P&gt;&lt;P&gt;'gpredict' = cx678D67 &lt;/P&gt;&lt;P&gt;'gcpredict' = cx678D67 &lt;/P&gt;&lt;P&gt;'gpredictlim' = cxEEEDE3 &lt;/P&gt;&lt;P&gt;'gcpredictlim' = cxEEEDE3 &lt;/P&gt;&lt;P&gt;'gerror' = cx000000 &lt;/P&gt;&lt;P&gt;'gcerror' = cx000000 &lt;/P&gt;&lt;P&gt;'ginsetheader' = colors('headerbg') &lt;/P&gt;&lt;P&gt;'ginset' = colors('databg') &lt;/P&gt;&lt;P&gt;'greferencelines' = cxA5A5A5 &lt;/P&gt;&lt;P&gt;'gheader' = colors('docbg') &lt;/P&gt;&lt;P&gt;'gconramp3cend' = cx3D793D &lt;/P&gt;&lt;P&gt;'gconramp3cneutral' = cxC8C1AE &lt;/P&gt;&lt;P&gt;'gconramp3cstart' = cxD18000 &lt;/P&gt;&lt;P&gt;'gramp3cend' = cx6EA16E &lt;/P&gt;&lt;P&gt;'gramp3cneutral' = cxB4CBAA &lt;/P&gt;&lt;P&gt;'gramp3cstart' = colors('docbg') &lt;/P&gt;&lt;P&gt;'gconramp2cend' = cxD18000 &lt;/P&gt;&lt;P&gt;'gconramp2cstart' = cxFFFFD4 &lt;/P&gt;&lt;P&gt;'gramp2cend' = cx6EA16E &lt;/P&gt;&lt;P&gt;'gramp2cstart' = colors('docbg') &lt;/P&gt;&lt;P&gt;'gtext' = cx000000 &lt;/P&gt;&lt;P&gt;'glabel' = cx000000 &lt;/P&gt;&lt;P&gt;'gborderlines' = cx4F493B &lt;/P&gt;&lt;P&gt;'goutlines' = cx000000 &lt;/P&gt;&lt;P&gt;'ggrid' = cxEFEDDD &lt;/P&gt;&lt;P&gt;'gaxis' = cx4F493B &lt;/P&gt;&lt;P&gt;'gshadow' = cxB4B4B4 &lt;/P&gt;&lt;P&gt;'gfloor' = cxE4E4E4 &lt;/P&gt;&lt;P&gt;'glegend' = cxFFFFFF &lt;/P&gt;&lt;P&gt;'gwalls' = cxFFFFFF &lt;/P&gt;&lt;P&gt;'gcdata12' = cx868686 &lt;/P&gt;&lt;P&gt;'gdata12' = cxA4A4A3 &lt;/P&gt;&lt;P&gt;'gcdata11' = cx746644 &lt;/P&gt;&lt;P&gt;'gdata11' = cx8A7A53 &lt;/P&gt;&lt;P&gt;'gcdata10' = cx699AA1 &lt;/P&gt;&lt;P&gt;'gdata10' = cx98C7CE &lt;/P&gt;&lt;P&gt;'gcdata9' = cxE6DA9E &lt;/P&gt;&lt;P&gt;'gdata9' = cxFAEEAF &lt;/P&gt;&lt;P&gt;'gcdata8' = cx6882A8 &lt;/P&gt;&lt;P&gt;'gdata8' = cx8AA4C9 &lt;/P&gt;&lt;P&gt;'gcdata7' = cxBEB794 &lt;/P&gt;&lt;P&gt;'gdata7' = cxD9D2AD &lt;/P&gt;&lt;P&gt;'gcdata6' = cxA5BDD7 &lt;/P&gt;&lt;P&gt;'gdata6' = cxBDD5EF &lt;/P&gt;&lt;P&gt;'gcdata5' = cx8E6C93 &lt;/P&gt;&lt;P&gt;'gdata5' = cxA47DAA &lt;/P&gt;&lt;P&gt;'gcdata4' = cxB3C54D &lt;/P&gt;&lt;P&gt;'gdata4' = cxCBD786 &lt;/P&gt;&lt;P&gt;'gcdata3' = cxA08A5D &lt;/P&gt;&lt;P&gt;'gdata3' = cxB49C6A &lt;/P&gt;&lt;P&gt;'gcdata2' = cxD18000 &lt;/P&gt;&lt;P&gt;'gdata2' = cxF2AE49 &lt;/P&gt;&lt;P&gt;'gcdata1' = cx678D67 &lt;/P&gt;&lt;P&gt;'gdata1' = cx8FB38F;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; So for example the color &lt;SPAN style="text-decoration: underline;"&gt;'gdata1'&lt;/SPAN&gt; is an attribute whose color is set to cx8FB38F -- then later in the template, you will find that GDATA1 is referenced in the sections for other style elements, like this (f you don't find gdata1 used in STYLES.ANALYSIS, you may have to check in the parent template to see where GDATA1 is used):&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;class GraphData1 / &lt;/P&gt;&lt;P&gt;markersymbol = "circle" &lt;/P&gt;&lt;P&gt;linestyle = 1 &lt;/P&gt;&lt;P&gt;contrastcolor = GraphColors('gcdata1') &lt;/P&gt;&lt;P&gt;color = GraphColors('gdata1'); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿&amp;nbsp; Or, you can look in these sections in the doc to see which style element is used for which piece of the graph (note that it might be different for device-based vs template based graphs):&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/graphref/64854/HTML/default/viewer.htm#p0gjdo2id6j13on1hcj16t6di13o.htm"&gt;http://support.sas.com/documentation/cdl/en/graphref/64854/HTML/default/viewer.htm#p0gjdo2id6j13on1hcj16t6di13o.htm&lt;/A&gt; (device-based graphics or SAS/GRAPH)&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/odsug/62755/HTML/default/viewer.htm#n1w891l3cr29jcn14un8mzicurqu.htm"&gt;http://support.sas.com/documentation/cdl/en/odsug/62755/HTML/default/viewer.htm#n1w891l3cr29jcn14un8mzicurqu.htm&lt;/A&gt; (device-based graphics or SAS/GRAPH)&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/odsug/62755/HTML/default/viewer.htm#n1w891l3cr29jcn14un8mzicurqu.htm"&gt;http://support.sas.com/documentation/cdl/en/odsug/62755/HTML/default/viewer.htm#n1w891l3cr29jcn14un8mzicurqu.htm&lt;/A&gt; (template-based graphics or ODS GRAPHICS)&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/grstatug/63302/HTML/default/viewer.htm#p18c2hn0ybnntyn1t6aitke3f0l6.htm"&gt;http://support.sas.com/documentation/cdl/en/grstatug/63302/HTML/default/viewer.htm#p18c2hn0ybnntyn1t6aitke3f0l6.htm&lt;/A&gt; (template-based graphics or ODS GRAPHICS)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; This program doesn't show you &lt;STRONG&gt;where &lt;/STRONG&gt;a color is used, but it will reveal the colors and what they are if you cut and paste a color list from a style template into this program.&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;﻿&amp;nbsp; I didn't do anything fancy like read the whole style template to find all the colors or where they were used, but I think the program will get you started.&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;﻿cynthia&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** To use this program either: ;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** 1) cut and paste attribute = color information from the ;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp; style template after the datalines4 statement.;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** 2) Or, put just a color name on a line;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp; can be in CX format, HTML #, Gray, CMYK, HLS, HSV or CSN format;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp; or "verbose" color format;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** If a color name is not valid, there will not be any color on that row.;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** as shown in the obs where the color specified was FRED.;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;data whatcolor;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; length styleinfo $60&amp;nbsp; element_name $30 color_nm $30;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; infile datalines length=lg;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; input styleinfo $varying. lg;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ** get rid of semi-colons if cut and pasted from code;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; origstyle = compress(styleinfo,';');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ** left justify the value ;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; styleinfo = compress(left(origstyle));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ** if color is attribute = value, then split;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ** the string apart;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; if index(styleinfo,'=') gt 0 then do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; element_name = scan(styleinfo,1,'=');&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; color_nm = scan(styleinfo,2,'=');&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; else if index(styleinfo,'=') eq 0 then do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; element_name = ' ';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; color_nm = trim(styleinfo);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;return;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;datalines4; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;'gcdata3' = cxA08A5D &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;'gdata2' = cxF2AE49;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;'gcdata1' = cx678D67 &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;'gdata1' = cx8FB38F&amp;nbsp; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; cx6495ed&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; #f2ae49&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #b49C6a&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; pink &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; fred&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; grayish red&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; very light purplish blue&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;H14055FF&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;;;;;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html file='c:\temp\whatcolor.html' style=sasweb;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; proc report data=whatcolor nowd;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; title 'Showing Color Values';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; column origstyle color_nm color_nm=c2 element_name ;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; define origstyle / display "Original Color Data"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(column)={font_weight=bold};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; define color_nm / display 'What Color';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; define c2 / display 'Color Name Used';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; define element_name / display 'Element or Color Type';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; compute color_nm ;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sval = 'style={foreground='||color_nm||&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' background='||color_nm||' font_size=12pt}';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call define(_COL_,'style',sval);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; run;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html close;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;﻿&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;﻿&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;﻿&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2012 03:22:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-the-SAS-GRAPH-colors-for-an-ODS-STYLE-to-a-data-set/m-p/24685#M4124</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-03-08T03:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: Output the SAS/GRAPH colors for an ODS STYLE to a data set</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-the-SAS-GRAPH-colors-for-an-ODS-STYLE-to-a-data-set/m-p/24686#M4125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Cynthia. But this was not really my question. Let me try again using the example you posted with a little more background about what&amp;nbsp; I am trying to do. I create a data set that has a list of styles as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods output styles=styleList;&lt;/P&gt;&lt;P&gt;proc template;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; list styles;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;ods _all_ close;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a UI (for a stored process), I present this list to the user and they pick a style. In the next chained stored process I pass the selected style (e.g., available as &amp;amp;style) and what I want is the list of gccolors as a data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using your example, I've played around with a few variations (unfortunately, I am not, by any means, terribly conversant in PROC TEMPLATE), but can't seem to get anything to give me a list of colors.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2012 03:54:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-the-SAS-GRAPH-colors-for-an-ODS-STYLE-to-a-data-set/m-p/24686#M4125</guid>
      <dc:creator>DonH</dc:creator>
      <dc:date>2012-03-08T03:54:47Z</dc:date>
    </item>
    <item>
      <title>Output the SAS/GRAPH colors for an ODS STYLE to a data set</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-the-SAS-GRAPH-colors-for-an-ODS-STYLE-to-a-data-set/m-p/24687#M4126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; The PROC TEMPLATE code will only give you a list of styles, not what is inside those styles. To get the "source code" for the template, you'd have to use this form of PROC TEMPLATE code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc template;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; source styles.analysis /store=sashelp.tmplmst&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file='c:\temp\analysis.txt';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above code will take the ANALYSIS style and "decompile" the template source from the item store. Then the decompiled source code will be put into c:\temp\analysis.txt -- but that doesn't put it into a SAS dataset yet -- just into an ASCII text file that you could read with a DATA step program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For grouped bar or pie or plot charts, the relevant style attributes being used are gdata1-gdata12. I guess you could take your value for &amp;amp;STYLE and then get the source code and parse out gdata1-gdata12 to get the list of particular colors used for grouped data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The template code is stored in an "item store" which is like the SAS registry -- it is a form of SAS file, but NOT a SAS data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Does that help, at all?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2012 05:40:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-the-SAS-GRAPH-colors-for-an-ODS-STYLE-to-a-data-set/m-p/24687#M4126</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-03-08T05:40:43Z</dc:date>
    </item>
    <item>
      <title>Output the SAS/GRAPH colors for an ODS STYLE to a data set</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-the-SAS-GRAPH-colors-for-an-ODS-STYLE-to-a-data-set/m-p/24688#M4127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Absolutely helps Cynthia. Thx!. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need the values in a macro variable for a stored process and the following code does this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename colors catalog 'work.tempfile.tempfile.source';&lt;/P&gt;&lt;P&gt;proc template;&lt;/P&gt;&lt;P&gt;&amp;nbsp; source styles.analysis /store=sashelp.tmplmst&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file=colors;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt; retain colorList;&lt;/P&gt;&lt;P&gt; length colorlist $256;&lt;/P&gt;&lt;P&gt; infile colors;&lt;/P&gt;&lt;P&gt; input;&lt;/P&gt;&lt;P&gt; if index(_infile_,"'gdata");&lt;/P&gt;&lt;P&gt; color = strip(scan(_infile_,2,'='));&lt;/P&gt;&lt;P&gt; color = '#' || substr(color,3,6);&lt;/P&gt;&lt;P&gt; /* create a cumulative list of colors */&lt;/P&gt;&lt;P&gt; colorList = catx(' ',colorList,color);&lt;/P&gt;&lt;P&gt; /* update a macro var with the new list of values */&lt;/P&gt;&lt;P&gt; call symputx('colorList',colorList);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%put &amp;amp;colorList;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will likely not run this code as part of the stored process. I will tweak it a bit an save a data set with one obs per style with the list of colors. My stored process can then use that data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx again!!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2012 13:00:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Output-the-SAS-GRAPH-colors-for-an-ODS-STYLE-to-a-data-set/m-p/24688#M4127</guid>
      <dc:creator>DonH</dc:creator>
      <dc:date>2012-03-08T13:00:56Z</dc:date>
    </item>
  </channel>
</rss>

