Module: ojpaletteutils

Oracle® JavaScript Extension Toolkit (JET)
17.0.0

F92240-01

QuickNav

JET Modules

See JET Module Loading for an overview of module usage within JET.

Functions

getColorValue(palette, value) : {string}

Returns a color for the specified value from the array of provided colors. This function will divide the range [0, 1] into equally-sized subranges based on the number of colors provided and then return the color whose subrange contains the specified value.
Parameters:
Name Type Description
palette Array.<string> An array of provided colors that will be divided into equally sized subranges based on the number of colors provided.
value number The value for which a color should be returned. Value will be constrained to 0, 1 if outside that range.
Returns:

The color whose subrange contains the specified value

Type
string