ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / IColorFactory Interface / GenerateColorsFromColorRamp Method
The color ramp to use to generate the colors
The number of colors to generate

In This Topic
    GenerateColorsFromColorRamp Method (IColorFactory)
    In This Topic
    Generate a list of [count] colors from the specified color ramp. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    List<CIMColor> GenerateColorsFromColorRamp( 
       CIMColorRamp colorRamp,
       int count
    )
    Function GenerateColorsFromColorRamp( _
       ByVal colorRamp As CIMColorRamp, _
       ByVal count As Integer _
    ) As List(Of CIMColor)

    Parameters

    colorRamp
    The color ramp to use to generate the colors
    count
    The number of colors to generate

    Return Value

    Exceptions
    ExceptionDescription
    Thrown when a method is called on the wrong Pro thread
    colorRamp
    count must be greater than zero
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also