Remove unused function

This commit is contained in:
2026-07-19 20:31:43 +02:00
parent a5bf2ac245
commit ee1c17b903
-33
View File
@@ -192,39 +192,6 @@ function drawCurve(canvas, counts, maxCount) {
ctx.stroke(); ctx.stroke();
} }
/**
* Return a heatmap-style color for a given ratio (0..1).
* Low = cool blue/gray, mid = warm amber, high = hot red/pink.
*/
function heatmapColor(ratio) {
// Clamp
const t = Math.max(0, Math.min(1, ratio));
// Four-stop gradient: cool → warm → hot
if (t < 0.33) {
// Cool muted purple-blue → warm amber
const s = t / 0.33;
const r = Math.round(99 + s * (245 - 99));
const g = Math.round(114 + s * (158 - 114));
const b = Math.round(176 + s * (48 - 176));
return `rgba(${r},${g},${b},0.70)`;
} else if (t < 0.66) {
// Warm amber → hot orange
const s = (t - 0.33) / 0.33;
const r = Math.round(245 + s * (255 - 245));
const g = Math.round(158 + s * (107 - 158));
const b = Math.round(48 + s * (35 - 48));
return `rgba(${r},${g},${b},0.75)`;
} else {
// Hot orange → intense red/pink
const s = (t - 0.66) / 0.34;
const r = Math.round(255 + s * (255 - 255));
const g = Math.round(107 + s * (75 - 107));
const b = Math.round(35 + s * (85 - 35));
return `rgba(${r},${g},${b},0.80)`;
}
}
/** /**
* Remove the heatmap from the DOM. * Remove the heatmap from the DOM.
*/ */