Weighted average colour mixing
===

(Sorry, not sure about the title wording).

I am wanting to make a progress-bar-type-thing which goes from green-orange-red as it moves across the screen. For example:

![enter image description here][1]


  [1]: http://i.stack.imgur.com/TEx8w.png

How can I find what the colour should be at a given point?

Thanks in advance!