ArcObjects Library Reference (Display)  

IRandomColorRamp Interface

Provides access to members that control the properties of a RandomColorRamp. A color ramp that is a list of randomly picked colors.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

IRandomColorRamp generates a specified number of unique, equally different, colors. The range of colors can be restricted based on a hue range, value range, or saturation range. The RandomColorRamp is designed around the HSV color model and therefore the colors in a random color ramp may be restricted in terms of hue, saturation, and value. Setting the StartHue and EndHue properties to values between 0 and 360 will restrict the colors that may appear in the ramp. Setting MinValue and MaxValue to between 0 and 100 will restrict the brightness, and setting MinSaturation and MaxSaturation to between 0 and 100 will restrict the purity of the colors in the ramp. Remember when you are setting your ranges that StartHue must alwasy be less than the EndHue, MinSaturation less than MaxSaturation, and MinValue less than MaxValue. If the values are set incorrectly, the RandomColorRamp will use the full range of hue, saturation, or value.

By default, the UseSeed property of the IRandomColorRamp is False. In this case, the RandomColorRamp creates a new random number to use as the seed value for each call to CreateRamp, ensuring that the Colors created are random and different each time CreateRamp is called. If the UseSeed property is set to True, the seed used for the RandomColorRamp is taken from the Seed property, and therefore each time you call CreateRamp with a specific Seed value, the sequence of colors created is unchanged.


 

Members

Description
Read-only property Color The color at the given index position. Call CreateRamp before calling this method.
Read-only property Colors The list of colors. Call CreateRamp before calling this method.
Method CreateRamp Generates a color ramp with length determined by Size value.
Read/write property EndHue The end hue (0-360).
Read/write property MaxSaturation The maximum saturation (0-100).
Read/write property MaxValue The maximum value (0-100).
Read/write property MinSaturation The minimum saturation (0-100).
Read/write property MinValue The minimum value (0-100).
Read/write property Name The name of the color ramp.
Read/write property Seed The seed of the random number generator.
Read/write property Size The number of colors that will be generated by the CreateRamp method.
Read/write property StartHue The start hue (0-360).
Read/write property UseSeed Indicates if a seed is used when the ramp is generated. Set this property to True without changing the Seed to generate identical color ramps in succession.

Inherited Interfaces

Interfaces Description
IColorRamp Provides access to the methods and properties common to all color ramp objects.

CoClasses that implement IRandomColorRamp

CoClasses and Classes Description
RandomColorRamp Defines a random color ramp, where ramp is a list of randomly picked colors.

See Also

IRandomColorRamp Interface | IMultiPartColorRamp Interface | IColorRamp.CreateRamp Method | IAlgorithmicColorRamp Interface | IColorRamp.Color Property | IPresetColorRamp Interface | IColorRamp Interface