From b4ea97362ef61fee80f1bd258d03af3b165b882e Mon Sep 17 00:00:00 2001 From: you Date: Thu, 19 Mar 2026 22:43:21 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20hash=20matrix=20color=20scheme=20?= =?UTF-8?q?=E2=80=94=20empty=3Dsubtle,=201=3Dlight=20green,=202+=3Dorange?= =?UTF-8?q?=E2=86=92red=20progression?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/analytics.js | 15 ++++++++------- public/index.html | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/public/analytics.js b/public/analytics.js index db868fa9..7931a300 100644 --- a/public/analytics.js +++ b/public/analytics.js @@ -805,14 +805,15 @@ const count = nodes.length; let bg, color; if (count === 0) { - bg = '#166534'; color = '#86efac'; // green — available + bg = 'var(--card-bg)'; color = 'var(--text-muted)'; // empty — subtle } else if (count === 1) { - bg = '#854d0e'; color = '#fde047'; // yellow — taken, no collision + bg = '#dcfce7'; color = '#166534'; // light green — taken, no collision } else { - // 2+ nodes: interpolate orange→red + // 2+ nodes: orange→red const t = Math.min((count - 2) / 4, 1); - const g = Math.round(80 * (1 - t)); - bg = `rgb(200,${g},30)`; color = '#fff'; + const r = Math.round(220 + 35 * t); + const g = Math.round(120 * (1 - t)); + bg = `rgb(${r},${g},30)`; color = '#fff'; } const status = count === 0 ? 'available' : count === 1 ? `1 node: ${nodes[0].name || nodes[0].public_key.slice(0,12)}` : `${count} nodes — COLLISION`; const countLabel = count === 0 ? '·' : count >= 3 ? '3+' : String(count); @@ -824,8 +825,8 @@ html += ''; html += `
- 0 — Available - 1 — One node + 0 — Available + 1 — One node 2 — Two nodes (collision) 3+ — Three+ nodes (collision)
`; diff --git a/public/index.html b/public/index.html index 3333c817..62bd3688 100644 --- a/public/index.html +++ b/public/index.html @@ -83,9 +83,9 @@ - + - +