Color fires from ember to white-hot instead of blue to red

About 90% of detections are under 20 MW, so the old blue and teal
stops painted most of the map in cold colors that do not read as fire.
The ramp now runs ember, red, flame, orange, gold and white-hot at the
same thresholds, each stop lighter than the one below, so the brightest
marks are the strongest fires. The heatmap uses the same colors.
This commit is contained in:
German Khokhlov committed 2026-11-02 13:48:28 +04:00
1 parent 02953665de
commit 18d55f58b9
12 files changed
+115 -87

No files matched your search

+7 -3
View File
@@ -11,16 +11,20 @@ import {
const fire = (lat, lon, frp = 10) => ({ lat, lon, frp });
test('palette runs cold to hot and starts fully transparent', () => {
test('palette runs ember to white-hot and starts fully transparent', () => {
assert.equal(HEAT_PALETTE[0].at, 0);
assert.equal(HEAT_PALETTE.at(-1).at, 1);
assert.deepEqual(heatColorAt(0), [0, 0, 0, 0]);
assert.equal(heatColorAt(0.01)[3], 0, 'below the floor nothing is painted');
const low = heatColorAt(0.15);
const high = heatColorAt(1);
assert.ok(low[2] > low[0], 'low heat is blue');
assert.ok(high[0] > high[2], 'the core is red');
assert.ok(low[0] > low[1] && low[1] > low[2], 'low heat is an ember red');
assert.ok(high[1] > low[1] && high[2] > low[2], 'the core is paler');
assert.ok(high[3] > low[3], 'hotter is more opaque');
for (let i = 1; i <= 100; i++) {
const [r, , b] = heatColorAt(i / 100);
assert.ok(r >= b, `no cold hue at ${i}%`);
}
});
test('binFires drops each detection into its equirectangular pixel', () => {