hi all,
After searching the Internet for one, I wrote a quick Python module to convert a value (most likley a temperature) to a cold-hot RGB colour - I’ve found this useful on the DOTHAT for representing the Pi’s internal CPU temp and also outside weather. Could be used for a lot of other things. The module has two functions - temp_rgb - takes a value, and a min-max range, and outputs an RGB tuple. it rebases the value you enter depending on the min/max range.
The other “get_temp”, returns the CPU temperature of the Pi.
(Gist: https://gist.github.com/philipok-1/99de9fa271a27e17b0ff62fbe2c0e3e6)
PS - the array of RGB colours was adapted from the excellent blog:
http://web-tech.ga-usa.com/2012/05/creating-a-custom-hot-to-cold-temperature-color-gradient-for-use-with-rrdtool/