<?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: How to use ColorFactory to produce transparent colors for a ColorRamp? in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-use-colorfactory-to-produce-transparent/m-p/799635#M1933</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I took a look at the colors I generated in the code. The Color Editor looks correct in my scenario:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var trans = 50.0;//semi transparent&lt;BR /&gt; var alabamaColor = CIMColor.CreateRGBColor(255, 170, 0, trans);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Color Editor" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/237064_ColorEditor.png" style="width: 620px; height: 426px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Sep 2016 18:57:48 GMT</pubDate>
    <dc:creator>CharlesMacleod</dc:creator>
    <dc:date>2016-09-30T18:57:48Z</dc:date>
    <item>
      <title>How to use ColorFactory to produce transparent colors for a ColorRamp?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-use-colorfactory-to-produce-transparent/m-p/799631#M1929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is my code:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;var colorRamp = new CIMFixedColorRamp();
var colors = new List();
foreach (var cls in classes)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; switch (cls.Label)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case "INSERT":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; colors.Add(DeltaLayer.ShapeType == esriGeometryType.esriGeometryPolygon
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ? ColorFactory.CreateRGBColor(0, 255, 0, 128) : ColorFactory.GreenRGB);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case "DELETE":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; colors.Add(DeltaLayer.ShapeType == esriGeometryType.esriGeometryPolygon
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ? ColorFactory.CreateRGBColor(255, 0, 0, 128) : ColorFactory.RedRGB);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; colors.Add(ColorFactory.GreyRGB);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}
colorRamp.Colors = colors.ToArray();
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The goal is to produce an&amp;nbsp;UniqueValueRenderer that will allow overlapping polygons to show distinct by using transparent colors.&lt;/P&gt;&lt;P&gt;As after line 20 the colors in the ramp looks like having some transparency:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/236341_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result in the property editor (and on the Map) does not reflect this:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/236373_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;Beside, the sliders near the Red and Blue value numeric boxes are very confusing: shouldn't they be read and blue?!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is this?!&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/236378_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: the Transparency can be adjusted from this editor proving that the UniqueValueRender supports transparent colors, but it does not come as such from the code!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:15:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-use-colorfactory-to-produce-transparent/m-p/799631#M1929</guid>
      <dc:creator>HoriaTudosie</dc:creator>
      <dc:date>2021-12-12T09:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to use ColorFactory to produce transparent colors for a ColorRamp?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-use-colorfactory-to-produce-transparent/m-p/799632#M1930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From your code example it is not exactly clear where you are using the color ramp. Please take a look at &lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-MapAuthoring#set-unique-value-renderer-to-the-selected-feature-layer-of-the-active-map"&gt;this&lt;/A&gt; code snippet on how to assemble a UniqueValueRenderer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2016 19:09:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-use-colorfactory-to-produce-transparent/m-p/799632#M1930</guid>
      <dc:creator>ThomasEmge</dc:creator>
      <dc:date>2016-09-29T19:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use ColorFactory to produce transparent colors for a ColorRamp?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-use-colorfactory-to-produce-transparent/m-p/799633#M1931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know by hart that snippet since it is the only one that shows something about creating an UniqueValueRender.&lt;/P&gt;&lt;P&gt;However it is limited to MapPoints that do not require transparency, not even color ramps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More details about how I'm using that code - in my other question, here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/message/638051-how-to-create-an-uniquevaluerenderer"&gt;https://community.esri.com/message/638051-how-to-create-an-uniquevaluerenderer&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2016 20:38:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-use-colorfactory-to-produce-transparent/m-p/799633#M1931</guid>
      <dc:creator>HoriaTudosie</dc:creator>
      <dc:date>2016-09-29T20:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to use ColorFactory to produce transparent colors for a ColorRamp?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-use-colorfactory-to-produce-transparent/m-p/799634#M1932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Horia, can you look at this sample please:&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Authoring/CIMExamples"&gt;https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Authoring/CIMExamples&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It shows how to make a unique renderer from scratch (in this code behind - CreateCIMRendererFromScratch.cs)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I modified it as follows: This seems to work ok for me. It makes a unique value renderer on a US States dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var trans = 50.0;//semi transparent&lt;BR /&gt; var alabamaColor = CIMColor.CreateRGBColor(255, 170, 0, trans);&lt;/P&gt;&lt;P&gt;CIMStroke outline = SymbolFactory.ConstructStroke(ColorFactory.BlackRGB, 2.0, SimpleLineStyle.Solid);&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;var alabama = new CIMUniqueValueClass() {&lt;BR /&gt; Values = alabamaValues.ToArray(),&lt;BR /&gt; Label = "Alabama",&lt;BR /&gt; Visible = true,&lt;BR /&gt; Editable = true,&lt;BR /&gt; Symbol = new CIMSymbolReference() {Symbol = SymbolFactory.ConstructPolygonSymbol(alabamaColor, SimpleFillStyle.Solid, outline) }&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;classes.Add(alabama);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;etc, etc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 18:38:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-use-colorfactory-to-produce-transparent/m-p/799634#M1932</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2016-09-30T18:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to use ColorFactory to produce transparent colors for a ColorRamp?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-use-colorfactory-to-produce-transparent/m-p/799635#M1933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I took a look at the colors I generated in the code. The Color Editor looks correct in my scenario:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var trans = 50.0;//semi transparent&lt;BR /&gt; var alabamaColor = CIMColor.CreateRGBColor(255, 170, 0, trans);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Color Editor" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/237064_ColorEditor.png" style="width: 620px; height: 426px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 18:57:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-use-colorfactory-to-produce-transparent/m-p/799635#M1933</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2016-09-30T18:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to use ColorFactory to produce transparent colors for a ColorRamp?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-use-colorfactory-to-produce-transparent/m-p/799636#M1934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Charles,&lt;/P&gt;&lt;P&gt;I see now: trans is 50.0 instead of 255!&lt;/P&gt;&lt;P&gt;Tx,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 20:00:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-use-colorfactory-to-produce-transparent/m-p/799636#M1934</guid>
      <dc:creator>HoriaTudosie</dc:creator>
      <dc:date>2016-09-30T20:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use ColorFactory to produce transparent colors for a ColorRamp?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-use-colorfactory-to-produce-transparent/m-p/799637#M1935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks - it works for me too! Great Response!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still a small issue but not related to my issues:&lt;/P&gt;&lt;P&gt;The colors of the sliders above look weird: shouldn't be red - something like red, green - something like green, and blue - something like blue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 20:10:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-use-colorfactory-to-produce-transparent/m-p/799637#M1935</guid>
      <dc:creator>HoriaTudosie</dc:creator>
      <dc:date>2016-09-30T20:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use ColorFactory to produce transparent colors for a ColorRamp?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-use-colorfactory-to-produce-transparent/m-p/1112553#M7306</link>
      <description>&lt;P&gt;I needed to create a&amp;nbsp;UniqueValueColorizerDefinition to symbolize a raster layer from a custom set of colors. I was able to modify the&amp;nbsp;CreateStretchRendererFromScratch() method in the CIMExamples project to create a&amp;nbsp;&amp;nbsp;UniqueValueColorizerDefinition object using the&amp;nbsp;CIMMultipartColorRamp that is created in the upper portion of this sample method. Thank you for this example. There is not much documentation on raster symbology.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 20:38:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-use-colorfactory-to-produce-transparent/m-p/1112553#M7306</guid>
      <dc:creator>LesleyBross1</dc:creator>
      <dc:date>2021-10-29T20:38:20Z</dc:date>
    </item>
  </channel>
</rss>

