heatmaps: part 14

This commit is contained in:
nym21
2026-06-01 12:01:24 +02:00
parent 102933b406
commit cb9f277d49
7 changed files with 92 additions and 110 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ export function intensityColor({ light, dark }) {
export function logIntensityColor({ light, dark }) {
return (value, context) => {
if (!Number.isFinite(value) || value <= 0) return 0x00000000;
const max = context.grid.getMaxValue(context.col);
const max = context.grid.getMaxValue();
if (max <= 0) return 0x00000000;
const lut = context.dark ? dark : light;
const t = Math.log2(value + 1) / Math.log2(max + 1);