ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / ColorFactory Class / CreateRGBColor Method
The red component of the color to be created
The green component of the color to be created
The blue component of the color to be created
The alpha component of the color to be created
Example

In This Topic
    CreateRGBColor Method (ColorFactory)
    In This Topic
    Creates the specified color.
    Syntax
    public CIMColor CreateRGBColor( 
       double R,
       double G,
       double B,
       double A
    )
    Public Function CreateRGBColor( _
       ByVal R As Double, _
       ByVal G As Double, _
       ByVal B As Double, _
       Optional ByVal A As Double _
    ) As CIMColor

    Parameters

    R
    The red component of the color to be created
    G
    The green component of the color to be created
    B
    The blue component of the color to be created
    A
    The alpha component of the color to be created

    Return Value

    Example
    Snippet Mesh material fill symbol
    /// <summary>
    /// Create a mesh symbol that can be applied to a multi-patch feature layer.
    /// </summary>
    /// <remarks>
    /// A mesh symbol is a CIMMeshSymbol object.  Define an array of CIMSymbolLayers which contains a CIMMaterialSymbol layer with the specified properties such as Color, etc.
    /// Assign this array of CIMSymbolLayers to the CIMMeshSymbol.
    /// ![MeshSymbolOrange](http://Esri.github.io/arcgis-pro-sdk/images/Symbology/mesh-material-orange.png)
    /// </remarks>
    /// <returns></returns>
    public static Task<CIMMeshSymbol> CreateMeshSymbolAsync()
    {
        return QueuedTask.Run<CIMMeshSymbol>(() =>
       {
           CIMSymbolLayer[] materialSymbolLayer =
          {
                new CIMMaterialSymbolLayer()
                {
                    Color = ColorFactory.Instance.CreateRGBColor(230,152,0),
                    MaterialMode = MaterialMode.Multiply
                }
           };
           var myMeshSymbol = new CIMMeshSymbol()
           {
               SymbolLayers = materialSymbolLayer
           };
           return myMeshSymbol;
       });
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also