An array containing {level, color} entries (object literals).
Levels are treated as Number
s. Colors are RIA Color
s.
The first element is a level. Entries are expected to be sorted in ascending level order.
var gradientColorMap = ColorMap.createGradientColorMap([
{level: 100, color: "rgba(0, 0, 0, 1.0)"}, //100 -> Black
{level: 200, color: "rgba(0, 255, 0, 1.0)"}, //200 -> Green
{level: 300, color: "rgba(0, 0, 255, 1.0)"} //300 -> Blue
]);
Create a gradient color map. Colors corresponding to levels in the level range of the color map are linearly interpolated (including alpha) between entries.
The example shows a ColorMap with 3 levels and 3 colors. The levels are mapped to colors as follows (level -> color):