ArcGIS Pro 3.3 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
    This method or property must be called within the lambda passed to QueuedTask.Run.
    colorRamp
    count must be greater than zero
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also