Added a function that converts a heat value to a colour.
Heat is drawn in either a black or white background.
Added option to write a log.