This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Display > ESRI.ArcGIS.Display > Interfaces > IA > IAlgorithmicColorRamp Interface (ArcObjects .NET 10.4 SDK) |
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.
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.
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.
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. |
Interfaces | Description |
---|---|
IColorRamp | Provides access to the methods and properties common to all color ramp objects. |
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. |
AlgorithmicColorRampPropertyPage Class | IMultiPartColorRamp Interface | IColorRamp.Color Property | IColorRamp.CreateRamp Method | IRandomColorRamp Interface | IColorRamp Interface | IPresetColorRamp Interface | IAlgorithmicColorRamp Interface