ArcGIS Pro 2.6 API Reference Guide
ConstructColorRamp(ColorRampAlgorithm,CIMColor,CIMColor) Method

ArcGIS.Desktop.Mapping Namespace > ColorFactory Class > ConstructColorRamp Method : ConstructColorRamp(ColorRampAlgorithm,CIMColor,CIMColor) Method
ColorRampAlgorithm
The from color
The to color
Construct a color ramp using the specified algorithm. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
Public Overloads Function ConstructColorRamp( _
   ByVal algorithm As ColorRampAlgorithm, _
   ByVal fromColor As CIMColor, _
   ByVal toColor As CIMColor _
) As CIMColorRamp

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

See Also

Reference

ColorFactory Class
ColorFactory Members
Overload List