<?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: colorpallette expression not matching field value in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/colorpallette-expression-not-matching-field-value/m-p/679425#M55646</link>
    <description>&lt;P&gt;I don't believe you can use colour names, such as Green and Yellow, you have to use hex codes or RGB, see here&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/Viz/TableFormatsXML#Color_palette_types_and_options" target="_blank"&gt;https://docs.splunk.com/Documentation/SplunkCloud/latest/Viz/TableFormatsXML#Color_palette_types_and_options&lt;/A&gt;&lt;/P&gt;&lt;P&gt;in your case it's interesting that you have yellow, as I would expect black if it does not understand colour names.&lt;/P&gt;&lt;P&gt;Have you tried&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;colorPalette type="expression"&amp;gt;if(value == "up","#00FF00", "#FFFF00")&amp;lt;/colorPalette&amp;gt;&lt;/LI-CODE&gt;</description>
    <pubDate>Sun, 03 Mar 2024 22:01:04 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2024-03-03T22:01:04Z</dc:date>
    <item>
      <title>colorpallette expression not matching field value</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/colorpallette-expression-not-matching-field-value/m-p/679163#M55633</link>
      <description>&lt;P&gt;hi, need some help, i have this format type but it seems the word 'up' is not matching for whatever reason.&lt;/P&gt;
&lt;P&gt;there is no spaces or anything in the field value.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the field value is extracted using 'rex'.&lt;/P&gt;
&lt;P&gt;i have this working in other fields, but this one got me stuck.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any help will be appreciated.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;format type="color" field="state"&amp;gt;
&amp;lt;colorPalette type="expression"&amp;gt;if (value == "up","#Green", "#Yellow")&amp;lt;/colorPalette&amp;gt;
&amp;lt;/format&amp;gt;&lt;/LI-CODE&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="thaghost99_0-1709222707938.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/29562i6E9AB78EB6E58BC9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="thaghost99_0-1709222707938.png" alt="thaghost99_0-1709222707938.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 17:08:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/colorpallette-expression-not-matching-field-value/m-p/679163#M55633</guid>
      <dc:creator>thaghost99</dc:creator>
      <dc:date>2024-02-29T17:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: colorpallette expression not matching field value</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/colorpallette-expression-not-matching-field-value/m-p/679348#M55643</link>
      <description>&lt;P&gt;What's the actual regex you are using to capture it?&lt;BR /&gt;And if you are sure you are using the right syntax because you copy pasted it from some working one - you could try to add | eval state = "up" as the last command in the search to force it to be "up" and see if that works.&amp;nbsp; If it doesn't, then I'd say there's something else wrong with that syntax.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2024 21:37:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/colorpallette-expression-not-matching-field-value/m-p/679348#M55643</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2024-03-01T21:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: colorpallette expression not matching field value</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/colorpallette-expression-not-matching-field-value/m-p/679425#M55646</link>
      <description>&lt;P&gt;I don't believe you can use colour names, such as Green and Yellow, you have to use hex codes or RGB, see here&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/Viz/TableFormatsXML#Color_palette_types_and_options" target="_blank"&gt;https://docs.splunk.com/Documentation/SplunkCloud/latest/Viz/TableFormatsXML#Color_palette_types_and_options&lt;/A&gt;&lt;/P&gt;&lt;P&gt;in your case it's interesting that you have yellow, as I would expect black if it does not understand colour names.&lt;/P&gt;&lt;P&gt;Have you tried&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;colorPalette type="expression"&amp;gt;if(value == "up","#00FF00", "#FFFF00")&amp;lt;/colorPalette&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 03 Mar 2024 22:01:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/colorpallette-expression-not-matching-field-value/m-p/679425#M55646</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2024-03-03T22:01:04Z</dc:date>
    </item>
  </channel>
</rss>

