From 727fdc5568cf140303c0ca7349d95feecf7005b7 Mon Sep 17 00:00:00 2001 From: you Date: Mon, 23 Mar 2026 16:50:12 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20hash=20size=20badge=20colors=20=E2=80=94?= =?UTF-8?q?=201B=20orange,=202B=20pale=20green,=203B=20bright=20green?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1-byte is worst (most collisions), 3-byte is best (least collisions). Colors now reflect quality: orange → pale green → bright green. --- public/nodes.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/nodes.js b/public/nodes.js index fea4f182..c80727f6 100644 --- a/public/nodes.js +++ b/public/nodes.js @@ -185,8 +185,9 @@ if (n.hash_size_inconsistent && p.payload_type === 4 && p.raw_hex) { const pb = parseInt(p.raw_hex.slice(2, 4), 16); const hs = ((pb >> 6) & 0x3) + 1; - const isDefault = hs === n.hash_size; - hashSizeBadge = ` ${hs}B`; + const hsColor = hs >= 3 ? '#16a34a' : hs === 2 ? '#86efac' : '#f97316'; + const hsFg = hs === 2 ? '#064e3b' : '#fff'; + hashSizeBadge = ` ${hs}B`; } return `
${timeAgo(p.timestamp)}