Provides access to members that control the AlgorithmicColorRamp. A color ramp defined by two colors and the algorithm used to traverse the intervening color space between them.
Product Availability
Description
The IAlgorithmicColorRamp interface allows you to specify how the series of colors is created using several properties.
You can use any objects that supports the IColor interface to set the FromColor or ToColor properties, although returning the FromColor or ToColor always gives an HSVColor object. Note that the FromColor and ToColor properties are set by value; therefore you cannot change the RGB values directly from the IColor interface returned by the IAlgorithmicColorRamp interface.
There are three algorithms that the IAlgorithmicColorRamp interface uses: esriCIELabAlgorithm, esriHSVAlgorithm, and esriLabLChAlgorithm. There is very little difference between these Algorithms when the FromColor and the ToColor are of the same or very similar hue (for the sake of simplicity we will base this discussion on the HSV color model). But when the hues for the FromColor and the ToColor are different (Hue is different by 40 or more on a 0-360 scale), the algorithms produce different results. The esriHSVAlgorithm traverses the hue difference in a purely linear fashion, resulting in a bright ramp where all intermediate colors are represented. For instance, a ramp from red to green would include orange, yellow, and yellow-green. The esriCIELabAlgorithm and esriLabLChAlgorithm produce a more blended result. Thus, a ramp from dark green to orange would not contain a bright yellow, but instead a more brown and green-gold or green-brown intermediate color. The advantage of the CIELAB algorithm is that the colors of the ramp are visually equidistant, which produces a better ramp.
When To Use
Use the IAlgorithmicColorRamp when representing data in a layer that is sequential (interval or ratio data). Or, use the IAlgorithmicColorRamp when creating an IGradientFill symbol.
Members
Description | ||
---|---|---|
Algorithm | The algorithm used to ramp between the first and last colors. | |
Color | The color at the given index position. Call CreateRamp before calling this method. | |
Colors | The list of colors. Call CreateRamp before calling this method. | |
CreateRamp | Generates a color ramp with length determined by Size value. | |
FromColor | The first color in the color ramp. | |
Name | The name of the color ramp. | |
Size | The number of colors that will be generated by the CreateRamp method. | |
ToColor | The last color in the color ramp. |
Inherited Interfaces
Interfaces | Description |
---|---|
IColorRamp | Provides access to the methods and properties common to all color ramp objects. |
CoClasses that implement IAlgorithmicColorRamp
CoClasses and Classes | Description |
---|---|
AlgorithmicColorRamp | Defines an algorithmic color ramp, where ramp is defined by two colors and the algorithm used to traverse the intervening color space between them. |
See Also
IColorRamp Interface | IMultiPartColorRamp Interface | IColorRamp.CreateRamp Method | IPresetColorRamp Interface | IAlgorithmicColorRamp Interface | IColorRamp.Color Property | IRandomColorRamp Interface