Packagecom.esri.bacore.thematicmapping
Classpublic final class ColorRampSchema
InheritanceColorRampSchema Inheritance Object

The ColorRampSchema is a collection of color gradients matching a single color ramp.

See also

TMColorRamp


Public Properties
 PropertyDefined By
  Name : String
[read-only] Color ramp name.
ColorRampSchema
Public Methods
 MethodDefined By
  
ColorRampSchema(name:String, colorRampsColors:Array)
Creates a new instance of the ColorRampSchema class.
ColorRampSchema
  
colorFromHexCode(hexCode:String):uint
[static] Creates a color from hexadecimal string value.
ColorRampSchema
  
getRampColors(colorsCount:int):Array
Gets a new collection of ramp colors.
ColorRampSchema
  
loadColorRampSchemas(schemas:XML):Array
[static] Loads a collection of color ramp schemas from XML.
ColorRampSchema
Property Detail
Nameproperty
Name:String  [read-only]

Color ramp name.


Implementation
    public function get Name():String
Constructor Detail
ColorRampSchema()Constructor
public function ColorRampSchema(name:String, colorRampsColors:Array)

Creates a new instance of the ColorRampSchema class.

The colorRampsColors parameter is an array of arrays containing items of the uint type.

Parameters
name:String — Color ramp name.
 
colorRampsColors:Array — Array of color gradients.
Method Detail
colorFromHexCode()method
public static function colorFromHexCode(hexCode:String):uint

Creates a color from hexadecimal string value.

Parameters

hexCode:String — Hexadecimal string value in the form "0xRRGGBB" or "#RRGGBB".

Returns
uint — A new instance of ARGB-color.
getRampColors()method 
public function getRampColors(colorsCount:int):Array

Gets a new collection of ramp colors.

If this color ramp schema is simple (consists of a unique gradient specified by two colors), ramp colors are calculated using mid values of ramp intervals. Otherwise, the best matching gradient is selected whose number of color equals to colorsCount. If an appropriated gradient is not found, the ramp colors are rendered using edge values of ramp intervals for predefined colors of a color gradient with the nearest number of colors.

Parameters

colorsCount:int — A number of colors required.

Returns
Array — An array containing the required number of colors.
loadColorRampSchemas()method 
public static function loadColorRampSchemas(schemas:XML):Array

Loads a collection of color ramp schemas from XML.

Parameters

schemas:XML — XML containing schemas.

Returns
Array — An array of ColorRampSchema items.