Generating dynamic linear gradient colours

Hi,

Would like to know is it possible to dynamically generate a range of colours.

Eg. from [COLOR=“Red”]red [/COLOR]to [COLOR=“Lime”]green [/COLOR][“0xFF0000”, “00FF00”]
Specifying a range of **100 **in between colours

Final results of an array of 100 colours [“0xFF0000”, …, …, …, …, …, “0x00FF00”]

Thanks!