I need to make an image, in Python, that looks like this but vertical and only green to red: http://www.google.co.uk/imgres?safe=off&espv=2&es_sm=91&biw=1280&bih=610&tbm=isch&tbnid=AuJytAtra5ARrM%3A&imgrefurl=http%3A%2F%2Fsvs.gsfc.nasa.gov%2Fgoto%3F4050&docid=cJwEIWqHngeBPM&imgurl=http%3A%2F%2Fsvs.gsfc.nasa.gov%2Fvis%2Fa000000%2Fa004000%2Fa004050%2Fcbar_scientists.png&w=1046&h=221&ei=9WMsU_TkHM-0hAfwyoDQBQ&zoom=1&ved=0CF4QhBwwAw&iact=rc&dur=194&page=1&start=0&ndsp=15
where green is 10 and red is 0. When it receives a number, it makes the bar colour up to the relevant point and b&w from there up. I then need Python to save this image to a location.
In this way, the image will represent how far away some thing is and show it in colour (green is far away - safe, red is close - danger) on the bar.
I know it's difficult to understand but how would I go about this?
Thanks!