How can I change the color of an icon depending on the temperatur?

Have a look at the code of