Transitioning colors based on variable.

Hi, I need to change the color of a GUITexture based on the value of a float. What I basically want is that when the float is at it’s limit (which is 30) it would be totally the second color, and if that variable is at 0 it would be exactly the first color, and apply this for every value between 0 and 30. Any tips on how to do this? I have no idea how to begin, so far I’ve only made the variable for the 2 colors and the other value (but that value was there from the beginning) and also the variable to assign the GUITexture so that I can change its color.

Thanks in advance.

I’m sure you could find a way to make the lerp system work like you want. The hard part is that colors don’t just naturally transition between each other simply by changing a couple of parameters.