ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / IColorFactory Interface / ConstructColorRamp Method / ConstructColorRamp(ColorRampAlgorithm,CIMColor,CIMColor) Method
ColorRampAlgorithm
The from color
The to color
Version

ConstructColorRamp(ColorRampAlgorithm,CIMColor,CIMColor) Method
Construct a color ramp using the specified algorithm. This method must be called on the MCT. Use QueuedTask.Run.
Syntax

Parameters

algorithm
ColorRampAlgorithm
fromColor
The from color
toColor
The to color

Return Value

CIMColorRamp
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
fromColor
toColor
Remarks
From and to colors are ignored for ColorRampAlgorithm.Fixed. For ColorRampAlgorithm.RandomHSV the fromColor acts as the minimum, the toColor acts as the maximum. From and to colors are converted to HSV.
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also