<?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 SGPLOT group colors in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-group-colors/m-p/497501#M16997</link>
    <description>&lt;P&gt;I am creating a grouped bar chart (9.4 M4) using sgplot and vbar statement. I am using the Printer style and default colors for the clustered groups:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="example1.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23419i90862F9A18D79B84/image-size/medium?v=v2&amp;amp;px=400" role="button" title="example1.PNG" alt="example1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to figure out the specific color codes in the above chart so that I can use them elsewhere in my reports so everything is consistent. The closest I got was the cx6F6EB3 code for the blue:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="example2.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23418iA4FC8EEE7EE94127/image-size/medium?v=v2&amp;amp;px=400" role="button" title="example2.PNG" alt="example2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I tried outputting the style elements to a txt file but this seems to be a very cumbersome way of figuring out the color codes...is this my only option?&lt;/P&gt;</description>
    <pubDate>Thu, 20 Sep 2018 18:04:03 GMT</pubDate>
    <dc:creator>lbarwick</dc:creator>
    <dc:date>2018-09-20T18:04:03Z</dc:date>
    <item>
      <title>SGPLOT group colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-group-colors/m-p/497501#M16997</link>
      <description>&lt;P&gt;I am creating a grouped bar chart (9.4 M4) using sgplot and vbar statement. I am using the Printer style and default colors for the clustered groups:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="example1.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23419i90862F9A18D79B84/image-size/medium?v=v2&amp;amp;px=400" role="button" title="example1.PNG" alt="example1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to figure out the specific color codes in the above chart so that I can use them elsewhere in my reports so everything is consistent. The closest I got was the cx6F6EB3 code for the blue:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="example2.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23418iA4FC8EEE7EE94127/image-size/medium?v=v2&amp;amp;px=400" role="button" title="example2.PNG" alt="example2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I tried outputting the style elements to a txt file but this seems to be a very cumbersome way of figuring out the color codes...is this my only option?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Sep 2018 18:04:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-group-colors/m-p/497501#M16997</guid>
      <dc:creator>lbarwick</dc:creator>
      <dc:date>2018-09-20T18:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT group colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-group-colors/m-p/497530#M16998</link>
      <description>&lt;P&gt;I assume you mean via PROC TEMPLATE? The colours are stored in GRAPHDATA1, GRAPHDATA2, so you could probably write another script to parse that out. Not sure if there's another way to access the GRAPHDATA colour elements.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/20041"&gt;@lbarwick&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am creating a grouped bar chart (9.4 M4) using sgplot and vbar statement. I am using the Printer style and default colors for the clustered groups:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="example1.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23419i90862F9A18D79B84/image-size/medium?v=v2&amp;amp;px=400" role="button" title="example1.PNG" alt="example1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to figure out the specific color codes in the above chart so that I can use them elsewhere in my reports so everything is consistent. The closest I got was the cx6F6EB3 code for the blue:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="example2.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23418iA4FC8EEE7EE94127/image-size/medium?v=v2&amp;amp;px=400" role="button" title="example2.PNG" alt="example2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I tried outputting the style elements to a txt file but this seems to be a very cumbersome way of figuring out the color codes...is this my only option?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Sep 2018 19:16:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-group-colors/m-p/497530#M16998</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-20T19:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT group colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-group-colors/m-p/497532#M16999</link>
      <description>&lt;P&gt;If you are good with Photoshop, you can determine the exact RGB values of the original plot, and then use those in subsequent plots.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A much simpler solution is to specify your own colors in the original plot rather than the default colors, and then there's no problem using those colors in subsequent plots.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Sep 2018 19:18:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-group-colors/m-p/497532#M16999</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-09-20T19:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT group colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-group-colors/m-p/497534#M17000</link>
      <description>&lt;P&gt;For your non-grouped bar chart, you should be able to reference the style element directly. Trying something like the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.class;
vbar age / fillattrs=GraphData1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Thu, 20 Sep 2018 19:26:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-group-colors/m-p/497534#M17000</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-09-20T19:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT group colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-group-colors/m-p/497536#M17001</link>
      <description>I suspect what you're trying to do is create a consistent colour per group across various charts. You would want to use a DATA ATTRIBUTE map (assuming you're using SGPLOT, not SAS/GRAPH).  Additionally, if you have SAS Enterprise Guide it has a style manager. So within the style manager you can see the color codes. If you don't have EG send me a DM with the style name you're using and I'll send you the color codes.</description>
      <pubDate>Thu, 20 Sep 2018 19:27:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-group-colors/m-p/497536#M17001</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-20T19:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT group colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-group-colors/m-p/497537#M17002</link>
      <description>&lt;P&gt;This is not going to be a very programmatic answer, but something I've had to do in the past when given an image to match colors with is to simply open it with Microsoft Paint. I use the eye dropper to get the color I'm looking for, select "Edit Colors" and I get a menu that shows me the Hue, Saturation, and Luminescence as well as the Red, Green and Blue values. I can use these values to find the appropriate hex color number based on the code in the following link:&amp;nbsp;&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2012/10/22/whats-in-a-name.html" target="_self"&gt;Blog on SAS Colors&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Sep 2018 19:32:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-group-colors/m-p/497537#M17002</guid>
      <dc:creator>JeffMeyers</dc:creator>
      <dc:date>2018-09-20T19:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT group colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-group-colors/m-p/497551#M17003</link>
      <description>&lt;P&gt;The following is from the style template source for style.printer&amp;nbsp; from SAS 9.4m4.&lt;/P&gt;
&lt;PRE&gt;   class GraphColors
      "Abstract colors used in graph styles" /
      'gcdata12' = cxF9DA04
      'gcdata11' = cxB38EF3
      'gcdata10' = cx47A82A
      'gcdata9' = cxD17800
      'gcdata8' = cxB26084
      'gcdata6' = cx7F8E1F
      'gcdata7' = cx2597FA
      'gcdata4' = cx543005
      'gcdata5' = cx9D3CDB
      'gcdata3' = cx01665E
      'gcdata2' = cxB2182B
      'gcdata1' = cx2A25D9
      'gdata12' = cxDDD17E
      'gdata11' = cxB7AEF1
      'gdata10' = cx87C873
      'gdata9' = cxCF974B
      'gdata8' = cxCD7BA1
      'gdata6' = cxBABC5C
      'gdata7' = cx94BDE1
      'gdata4' = cxA9865B
      'gdata5' = cxB689CD
      'gdata3' = cx66A5A0
      'gdata2' = cxDE7E6F
      'gdata1' = cx7C95CA;
&lt;/PRE&gt;
&lt;P&gt;The GDATA entries should be the colors and GCDATA the contrast colors which may be outlines and such. The suffix, 1, 2, 3 etc is the order they are applied unless overwritten&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Sep 2018 20:45:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-group-colors/m-p/497551#M17003</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-09-20T20:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT group colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-group-colors/m-p/497756#M17004</link>
      <description>&lt;P&gt;I ended up just trying each of the color codes from the template output. It ended up being gdata1 - cx7C95CA.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15130"&gt;@DanH_sas&lt;/a&gt;&amp;nbsp;suggestion of specifying gdata1 as the fillattrs but I got a warning that the color code was not recognized.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;the Data attribute map sounds interesting. I am using sgplot but don't have EG.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2018 10:37:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-group-colors/m-p/497756#M17004</guid>
      <dc:creator>lbarwick</dc:creator>
      <dc:date>2018-09-21T10:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT group colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-group-colors/m-p/497808#M17005</link>
      <description>&lt;P&gt;I echo&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15130"&gt;@DanH_sas&lt;/a&gt;&amp;nbsp;that you should use GraphData1, etc, when possible. If you can't do it, then a programmatic solution is explained in the blog post &lt;A href="https://blogs.sas.com/content/iml/2017/02/06/group-colors-sgplot.html" target="_self"&gt;"What colors does PROC SGPLOT use for markers?"&lt;/A&gt;&amp;nbsp;The article illustrates the idea by using the "statistical" style, but you can replace that with any other style.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2018 13:06:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-group-colors/m-p/497808#M17005</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-09-21T13:06:44Z</dc:date>
    </item>
  </channel>
</rss>

