SQL code to convert numbers to heatmap colours