Returns a color value along the gradient defined by the given colors depending on the given value. Works like
creating a linear gradient and picking the color at value portion of the way across.
Providing no colors results in white (as a fallback). Providing a single color results in that color every time.
Useful for intensity or data-related coloring.
Parameters
value: number
The value for the color.
...colors: string[]
Returns string
Note
Colors in the middle of two colors can often be ugly, for this reason it is recommended to supply more than two
colors if those colors are far apart from each other for more control over intermediate values.
Returns a color value along the gradient defined by the given
colorsdepending on the givenvalue. Works like creating a linear gradient and picking the color atvalueportion of the way across.Providing no colors results in white (as a fallback). Providing a single color results in that color every time.
Useful for intensity or data-related coloring.