I first came across this method of color selection in a formula called "RELATIVE PERFORMANCE" & if I remember correctly it was from the library, hence am not posting the formula in the forum.
Can some one kindly explain how this method of color selection works----
color = colorDarkRed + ( ( 2 * i ) % 15 ), the part after "+".
now, the formula is such that whatever the value of I is, multiplied by 2 and so on can occur,
but the % is modulus, which also means the remainder of the division.
Basically, you can divide any number by 15 and modulus will have a fixed range of 0 to 14.
so 24 will dynamically be added with a number b/w 0 and 14 to generate a new color value in variable "color"
so you have a range of colors from
colorDarkRed = 24 to colorViolet = 38