Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Calculating heat map colours
function heatMapColorforValue(value,alpha,max){
alpha=100*alpha;
value=value/max;
var h = parseInt((1.0 - value) * 240)
return "hsl(" + h + "deg 100% 50% / "+alpha+"%)";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment