ArcGIS Pro 2.6 API Reference Guide
GenerateColorsFromColorRamp Method (ColorFactory)

ArcGIS.Desktop.Mapping Namespace > ColorFactory Class : GenerateColorsFromColorRamp Method
The color ramp to use to generate the colors
The number of colors to generate
Generate a list of [count] colors from the specified color ramp. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public List<CIMColor> GenerateColorsFromColorRamp( 
   CIMColorRamp colorRamp,
   int count
)
Public 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 10, Windows 8.1, Windows 7

See Also

Reference

ColorFactory Class
ColorFactory Members