<?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 Re: PROC SGPLOT how to get more diverse colors in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-how-to-get-more-diverse-colors/m-p/807991#M22781</link>
    <description>&lt;P&gt;For a discussion of SAS color-naming schemes (with examples) see &lt;A href="https://blogs.sas.com/content/iml/2012/10/22/whats-in-a-name.html" target="_self"&gt;"Three ways to specify colors in SAS statistical graphics procedures,"&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an example of how to specify different shades of greens on the STYLEATTRS statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.cars;
styleattrs datacolors=('Light Brownish Green' 'DarkOliveGreen' 'SeaGreen');
vbar Cylinders / group=origin;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 15 Apr 2022 13:11:22 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2022-04-15T13:11:22Z</dc:date>
    <item>
      <title>PROC SGPLOT how to get more diverse colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-how-to-get-more-diverse-colors/m-p/807957#M22777</link>
      <description>&lt;P&gt;Hi Folks,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using proc sgplot in SAS 9.4-1M5.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Datacolors=&lt;EM&gt;green&lt;/EM&gt; is too dark and Datacolors=&lt;EM&gt;lightgreen&lt;/EM&gt;&amp;nbsp;produces too bright green bars to the plot's background I have to stick to.&lt;/P&gt;
&lt;P&gt;Do you know color codes or ways that I can specify in the sgplot for more diverse green options? I need &lt;EM&gt;green&lt;/EM&gt; some where between these dark and bright green options.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cruise_0-1650003503160.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70412i2F41235A3B457A96/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cruise_0-1650003503160.png" alt="Cruise_0-1650003503160.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cruise_1-1650003555503.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70413i83A6B6AE6FA94F30/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cruise_1-1650003555503.png" alt="Cruise_1-1650003555503.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=swimmer; by BOR; run;
PROC SGPLOT DATA=SWIMMER; 
STYLEATTRS DATACOLORS=(LIGHTGREEN YELLOW ROSE);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Thank you for your time in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2022 06:25:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-how-to-get-more-diverse-colors/m-p/807957#M22777</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2022-04-15T06:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT how to get more diverse colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-how-to-get-more-diverse-colors/m-p/807961#M22778</link>
      <description>&lt;P&gt;If you go to this link you will find that SAS supports multiple ways to define colors: &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/graphref/p0edl20cvxxmm9n1i9ht3n21eict.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/graphref/p0edl20cvxxmm9n1i9ht3n21eict.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't want to learn one of the numeric coding systems like RGB, CMYK I suggest that you look at the page for "Color Naming System" or CNS. That uses more modifiers for color where you combine the elements of Lightness, Saturation and Hue from the following table.&lt;/P&gt;
&lt;P&gt;So you could have&lt;/P&gt;
&lt;P&gt;Verydarkgreen&lt;/P&gt;
&lt;P&gt;Verydarkgrayishgreen&lt;/P&gt;
&lt;P&gt;Verydarkmoderategreen&lt;/P&gt;
&lt;P&gt;Verydarkstronggreen&lt;/P&gt;
&lt;P&gt;Verydarkvividgreen&lt;/P&gt;
&lt;P&gt;(replace VeryDark with Dark, Medium,Light or verylight)&lt;/P&gt;
&lt;P&gt;This system also allows combine colors that are adjacent (green is adjacent to blue) so you can use&lt;/P&gt;
&lt;P&gt;BlueGreen, GreenBlue, YellowGreen, GreenYellow. Or to have one of the colors contribute a bit less add "ish"&lt;/P&gt;
&lt;P&gt;YellowishGreen, GreenishYellow.&lt;/P&gt;
&lt;P&gt;Along with the other lightness and saturation options.&lt;/P&gt;
&lt;P&gt;So you can have MediumModerateYellowishGreen for example.&lt;/P&gt;
&lt;P&gt;BLACK and WHITE will be that regardless of other elements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="xis-eDocBody"&gt;
&lt;DIV id="p0edl20cvxxmm9n1i9ht3n21eict" class="xis-topic"&gt;
&lt;DIV id="p032u8muc42dbgn1sgqrm9fk337k" class="xis-subTopic"&gt;
&lt;DIV id="p07irnv8oodew5n19tftzd1sw8fl" class="xis-topicContent"&gt;
&lt;DIV id="p02gpr56wo2vyrn1sr9tf8nyzsvb" class="xis-table"&gt;
&lt;TABLE class="tgroup"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="p17uayrlnyl7wnn0zks7wp3y0al2" class="xis-paraTableFirst"&gt;Lightness&lt;/DIV&gt;
&lt;/TH&gt;
&lt;TH class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="p1iyfi4wvb4xgsn1vg0620wj0jqe" class="xis-paraTableFirst"&gt;Saturation&lt;/DIV&gt;
&lt;/TH&gt;
&lt;TH class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="p0hmnhgnky2b77n1rghi62f0lxmh" class="xis-paraTableFirst"&gt;Hue&lt;/DIV&gt;
&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n081jy3p9kgwq4n1ifjezgfiyhd6" class="xis-paraTableFirst"&gt;Black&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n1a8rpwuazzqtgn1x5d7v4d9fav6" class="xis-paraTableFirst"&gt;Gray&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="p1182ymapycaxpn10r9tbzmm9veb" class="xis-paraTableFirst"&gt;Blue&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="p1tf3y0x21zklrn1iz1gg6spsrv4" class="xis-paraTableFirst"&gt;Very Dark&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n1q8xz38fi6efqn1lq8vpnn6gkt2" class="xis-paraTableFirst"&gt;Grayish&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="p0cp38x7qavrrdn1ro16y25jnxhf" class="xis-paraTableFirst"&gt;Purple&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="p0yclp4grz2sm1n17ltx7tzh9qli" class="xis-paraTableFirst"&gt;Dark&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n0yi7hpfo34mgcn12s0vdn4y00zz" class="xis-paraTableFirst"&gt;Moderate&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="p0y3sb2f9syesjn1mfqg99di7hxv" class="xis-paraTableFirst"&gt;Red&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n029uumicrg259n18jqtwdulk3jm" class="xis-paraTableFirst"&gt;Medium&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n0c5r73v3n7yprn1q6csuyucr0jh" class="xis-paraTableFirst"&gt;Strong&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n0tmwovrvjsr4zn18nyuv6vco9gl" class="xis-paraTableFirst"&gt;Orange/Brown&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="p18kwrsl9ur623n14jiodtv6kqcv" class="xis-paraTableFirst"&gt;Light&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="p0nfw7tfejmpjrn1scucxrcrr8wi" class="xis-paraTableFirst"&gt;Vivid&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n1xmhwrwy1hnnan1fvlcql2asgzg" class="xis-paraTableFirst"&gt;Yellow&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n101o8czm6nfh6n11frvo0p21fqk" class="xis-paraTableFirst"&gt;Very Light&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n0v0a9vvqz1xben1n2ej9ytseeq1" class="xis-paraTableFirst"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="p1hmhhq6ktoc7rn119jtr2tc8h63" class="xis-paraTableFirst"&gt;Green&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="p1ll3jt8nfiswmn13g6e2qiw539v" class="xis-paraTableFirst"&gt;White&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 15 Apr 2022 07:29:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-how-to-get-more-diverse-colors/m-p/807961#M22778</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-04-15T07:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT how to get more diverse colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-how-to-get-more-diverse-colors/m-p/807990#M22780</link>
      <description>&lt;P&gt;You can use function Palette() in IML.&lt;BR /&gt;&lt;BR /&gt;proc iml;&lt;BR /&gt;greens9 = Palette("GREENS", 9);&lt;BR /&gt;print greens9;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure IML: greens9" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;CXF7FCF5&lt;/TD&gt;
&lt;TD class="l data"&gt;CXE5F5E0&lt;/TD&gt;
&lt;TD class="l data"&gt;CXC7E9C0&lt;/TD&gt;
&lt;TD class="l data"&gt;CXA1D99B&lt;/TD&gt;
&lt;TD class="l data"&gt;CX74C476&lt;/TD&gt;
&lt;TD class="l data"&gt;CX41AB5D&lt;/TD&gt;
&lt;TD class="l data"&gt;CX238B45&lt;/TD&gt;
&lt;TD class="l data"&gt;CX006D2C&lt;/TD&gt;
&lt;TD class="l data"&gt;CX00441B&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 15 Apr 2022 13:14:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-how-to-get-more-diverse-colors/m-p/807990#M22780</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-04-15T13:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT how to get more diverse colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-how-to-get-more-diverse-colors/m-p/807991#M22781</link>
      <description>&lt;P&gt;For a discussion of SAS color-naming schemes (with examples) see &lt;A href="https://blogs.sas.com/content/iml/2012/10/22/whats-in-a-name.html" target="_self"&gt;"Three ways to specify colors in SAS statistical graphics procedures,"&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an example of how to specify different shades of greens on the STYLEATTRS statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.cars;
styleattrs datacolors=('Light Brownish Green' 'DarkOliveGreen' 'SeaGreen');
vbar Cylinders / group=origin;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Apr 2022 13:11:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-how-to-get-more-diverse-colors/m-p/807991#M22781</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-04-15T13:11:22Z</dc:date>
    </item>
  </channel>
</rss>

