ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / ColorFactory Class / GreyRGB Property
Example

In This Topic
    GreyRGB Property (ColorFactory)
    In This Topic
    Gets the grey color.
    Syntax
    public CIMColor GreyRGB {get;}
    Public ReadOnly Property GreyRGB As CIMColor
    Example
    Create Ellipse Graphic Element
    //Must be on QueuedTask.Run(() => { ...
    
    //Build geometry
    Coordinate2D center = new Coordinate2D(2, 2.75);
    var eabElp = new EllipticArcBuilderEx(center, 0, 1, 0.45, 
                                           ArcOrientation.ArcClockwise);
    var ellipse = eabElp.ToSegment();
    
    //Set symbolology, create and add element to layout
    CIMStroke outline = SymbolFactory.Instance.ConstructStroke(
                                    ColorFactory.Instance.GreenRGB, 2.0,
                            SimpleLineStyle.Dot);
    CIMPolygonSymbol ellipseSym = SymbolFactory.Instance.ConstructPolygonSymbol(
                             ColorFactory.Instance.GreyRGB, SimpleFillStyle.Vertical, 
                                                      outline);
    
    var poly = PolygonBuilderEx.CreatePolygon(
      PolylineBuilderEx.CreatePolyline(ellipse, AttributeFlags.AllAttributes));
    
    var elpElm = ElementFactory.Instance.CreateGraphicElement(
      container, poly, ellipseSym, "New Ellipse");
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also