<?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: Color FeatureLayer by dynamic RGB or HEX attribute values in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/color-featurelayer-by-dynamic-rgb-or-hex-attribute/m-p/1111306#M75077</link>
    <description>&lt;P&gt;You can use the color visual variables to accomplish this. Check out this guide page.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/visualization/data-driven-styles/visual-variables/#color" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/visualization/data-driven-styles/visual-variables/#color&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Oct 2021 16:01:13 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2021-10-26T16:01:13Z</dc:date>
    <item>
      <title>Color FeatureLayer by dynamic RGB or HEX attribute values</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/color-featurelayer-by-dynamic-rgb-or-hex-attribute/m-p/1111228#M75074</link>
      <description>&lt;P&gt;I am trying to render a large dataset of points or polygons, and colour them directly based on hex or RGB values that exist directly in the attributes of each feature.&lt;/P&gt;&lt;P&gt;I do not want to use a UniqueValueRenderer to manually define stops, etc.&amp;nbsp; I just want to send the RGB value from the attributes directly into the renderer for that point/polygon.&amp;nbsp; This is very simple to do with Mapbox, but seemingly not simple with the ArcGIS Javascript API?&lt;/P&gt;&lt;P&gt;My very simple renderer - I just want color to directly use the HEX in the attributes of each feature.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;renderer: {
  type: "simple",
  symbol: {
    type: "simple-fill",
    color: &amp;lt;make-me-attribute-driven&amp;gt;,
    outline: null
  },
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: I can do this manually by using a GraphicsLayer and creating each graphic individually where I define it's colour etc, however I want to take advantage of Clustering and some of the other FeatureLayer capabilities not available to GraphicsLayers.&lt;/P&gt;&lt;P&gt;Is this actually possible?&amp;nbsp; All the examples use UniqueValueRenderer to colour based on a defined number of stops, which is not what I want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 13:23:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/color-featurelayer-by-dynamic-rgb-or-hex-attribute/m-p/1111228#M75074</guid>
      <dc:creator>RyanVeenstraGHD</dc:creator>
      <dc:date>2021-10-26T13:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: Color FeatureLayer by dynamic RGB or HEX attribute values</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/color-featurelayer-by-dynamic-rgb-or-hex-attribute/m-p/1111306#M75077</link>
      <description>&lt;P&gt;You can use the color visual variables to accomplish this. Check out this guide page.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/visualization/data-driven-styles/visual-variables/#color" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/visualization/data-driven-styles/visual-variables/#color&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 16:01:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/color-featurelayer-by-dynamic-rgb-or-hex-attribute/m-p/1111306#M75077</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-10-26T16:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Color FeatureLayer by dynamic RGB or HEX attribute values</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/color-featurelayer-by-dynamic-rgb-or-hex-attribute/m-p/1111423#M75081</link>
      <description>&lt;P&gt;I still can't quite see how this achieves my requirements.&lt;/P&gt;&lt;P&gt;The documentation still implies I need the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;A reference to a data value either from a field name, or an&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/visualization/best-practices/arcade/" target="_blank"&gt;Arcade expression&lt;/A&gt;.&lt;/LI&gt;&lt;LI&gt;At least two color stops that match data values to colors. The colors of symbols with data values between the designated stops are linearly interpolated.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not looking to do a colour ramp based on a scalar variable, I need to use the exact HEX code from my attributes to colour my geometry.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the above, I would need to define a colour stop for every single HEX value I might find in my attributes.&amp;nbsp; Because I'm wanting to visualise potentially 1000's of features each with a specific and not predetermined HEX colour, this isn't really feasible (i'd potentially need 1000's of colour stops to do this)&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 19:52:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/color-featurelayer-by-dynamic-rgb-or-hex-attribute/m-p/1111423#M75081</guid>
      <dc:creator>RyanVeenstraGHD</dc:creator>
      <dc:date>2021-10-26T19:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Color FeatureLayer by dynamic RGB or HEX attribute values</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/color-featurelayer-by-dynamic-rgb-or-hex-attribute/m-p/1111436#M75082</link>
      <description>&lt;P&gt;Ah, ok. this is something that can be done via CIMSymbol and primitive overrides. Here's a sample.&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/kekenes/pen/VwpKMvg?editors=1000" target="_blank"&gt;https://codepen.io/kekenes/pen/VwpKMvg?editors=1000&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;primitiveOverrides: [
    {
        type: "CIMPrimitiveOverride",
        primitiveName: "colorOverride",
        propertyName: "Color",
        valueExpressionInfo: {
        type: "CIMExpressionInfo",
        title: "Arcade color override",
        expression: `
            // return "rgb(0,255,0)"
            return $feature.NAIP_rgb;
        `,
        returnType: "Default"
        }
    }
]&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 26 Oct 2021 20:14:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/color-featurelayer-by-dynamic-rgb-or-hex-attribute/m-p/1111436#M75082</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-10-26T20:14:31Z</dc:date>
    </item>
  </channel>
</rss>

