gradient(value,value1,color1,value2,color2,moreNumbersAndColors)¶
Definition¶
String gradient(Number value, Number value1, String color1, Number value2, String color2, Object ... moreNumbersAndColors)
Description¶
Requires a value and a list of number+color pairs. It will return a color that properly represents the supplied value. For example, given the pairs 0=black and 2=white,1 will return grey, any value <= 0 will return black and any value >=2 will return white. Colors must be in standard html notation (#RRGGBB), ex: #AABB88. At least 2 number+colorpairs are required but additional pairs can be provided in the var args parameter
Parameter Definition¶
Name | Type | Description |
---|---|---|
value | Number | Value to return color for |
value1 | Number | Value associated with color1 |
color1 | String | color associated with value1(must be in #RRGGBB format) |
value2 | Number | Value associated with color2 |
color2 | String | color associated with value2(must be in #RRGGBB format) |
moreNumbersAndColors | Object... | Additional value/number pairs, must be even number of elements, where even elements are a number and odd elements are a color |