ArcGIS Pro 3.4 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
Version

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
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