ArcGIS Pro 3.0 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

GenerateColorsFromColorRamp Method (IColorFactory)
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
)

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, Windows 8.1

ArcGIS Pro version: 2.2 or higher.
See Also