GradientColourRGB

This function takes a value, and an array of value-colour combinations (usually created from GRADIENT_).

It returns a colour that smoothly interpolates between the various values, allowing you to smoothly transition between colours as the value animates.

Example

var colourtouse = GradientColourRGB(myvalue,[[0, hexToRgbFloat("0000ff")],[0.4, hexToRgbFloat("00ff00")],[1, hexToRgbFloat("ff0000")]]);

In the above example, a number between 0-1 named myvalue is converted into a colour.

The colour will be red at 0, will fade to green at 0.4 and then fade to red at 1.

The individual colours passed to GradientColourRGB are actually an array of three values in red-green-blue order - the hexToRGBFloat function takes care of the conversion of hex codes to arrays.