How would I programmatically change the colour of a shape I have drawn based on a colour range? My shape can have a value between 0 and 1 which defines its colour: full red (0) to full green (1), with white as the mid range. Please see the image link for the colour transition style.
http://combinationstudios.com/static/colour-range.png
Thanks, Ben
You are looking for gradients. Here is Apple documentation on how to use them.
In your case, you will need to use three color components (red, white and green) and not only (red and green).