How do you fade in a hex colour? based on a scale of 0 – 100.
Say I want an element to be green when awarded 100, and white when 0, with all the shades in between.
Update:
HEX>RGB>HSV – Helpful collection of routines here:
http://php.amnuts.com/index.php?do=view&id=16&file=class.image.php
You should use the HSV colour coordinates, and let the hue (H) and value (V) be fixed, and vary the saturation (S) from none (gray, 0) to full (green, 1). It is easy to convert between RGB and HSV. You can use the formulae from Wikipedia.