<div dir="ltr"><div>Firstly, thank you for the nice clean example that illustrates the problem.</div><div><br></div><div><br></div><div>The named colors are indeed strings and as such should be surrounded by quotes. The RGBa values on the other hand are numerics -- try removing the quotes around the RGB-triplets.</div><div><br></div><div>Hope that helps...</div><div>Rick<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Aug 25, 2019 at 4:47 AM WUJIE via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Hi NCL experts,</div><div><br></div><div>In the NCL Bar Chart, one can easily control the colors of the bar by using Named Color for "gsnXYBarChartColors".</div><div>However, below errors occurs if I use the RGB array for <span style="line-height:16.8px">"gsnXYBarChartColors</span><span style="line-height:16.8px">"</span>:</div><div><br></div><div><div><font color="#0000ff">(0)<span class="gmail-m_2110614914915574452Apple-tab-span" style="white-space:pre-wrap"> </span>convert_color_to_rgba: Error: unknown color type.</font></div><div><font color="#0000ff">(0)<span class="gmail-m_2110614914915574452Apple-tab-span" style="white-space:pre-wrap"> </span> Returning all missing values.</font></div><div><font color="#0000ff">warning:_NhlGetGksCi:Invalid Color index=-1073741824</font></div><div><font color="#0000ff">warning:_NhlGetGksCi:Invalid Color index=-1073741824</font></div><div><font color="#0000ff">warning:_NhlGetGksCi:Invalid Color index=-1073741824</font></div><div><font color="#0000ff">warning:_NhlGetGksCi:Invalid Color index=-1073741824</font></div><div><font color="#0000ff">warning:_NhlGetGksCi:Invalid Color index=-1073741824</font></div><div><font color="#0000ff">warning:_NhlGetGksCi:Invalid Color index=-1073741824</font></div></div><div><font color="#ff6600"><br></font></div><div>To show my question better I wrote a simple test script, which is attached here. <span style="line-height:1.5">It works using named color but fail when RGB array is used for </span><span style="line-height:16.8px">gsnXYBarChartColors. </span></div><div><span style="line-height:16.8px">Does anyone can tell me how can I use self-defined color (with RGB values) for colors of Bar Chart?</span></div><div><span style="line-height:16.8px"></span></div><div><span style="line-height:16.8px"><br></span></div><div><span style="line-height:16.8px">Thanks in advance.</span></div><div><span style="line-height:16.8px"><br></span></div><div><span style="line-height:16.8px">Jie Wu</span></div><div><font color="#ff6600"><br></font></div>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>