ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / ColorFactory Class / ConstructColorRamp Method / ConstructColorRamp(ColorRampAlgorithm,CIMColor,CIMColor) Method
ColorRampAlgorithm
The from color
The to color

In This Topic
    ConstructColorRamp(ColorRampAlgorithm,CIMColor,CIMColor) Method
    In This Topic
    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 11, Windows 10, Windows 8.1

    See Also