mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-29 19:58:10 -07:00
heatmaps: part 14
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user