From ba0c8a715fda8fcd392e7b07ebdf798b59626392 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 7 Jun 2026 03:09:35 -0400 Subject: [PATCH] =?UTF-8?q?Highlights=20are=20fills=20only=20=E2=80=94=20n?= =?UTF-8?q?o=20more=20underlines?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit End rhymes keep the stronger tint; phrase rhymes paint the stretches their words don't claim, so multi-word matches still read as units. Co-Authored-By: Claude Opus 4.8 (1M context) --- static/index.html | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/static/index.html b/static/index.html index 3b338e1..b129ffb 100644 --- a/static/index.html +++ b/static/index.html @@ -464,17 +464,11 @@ function render(){ const w = words.find(t=>t.s <= a && b <= t.e); const p = phrases.find(t=>t.s <= a && b <= t.e); if(!w && !p){ h += text; continue; } - let style = ''; - if(w) style += `background:color-mix(in srgb, ${colorOf(w)} ${w.end ? 24 : 15}%, transparent);`; - let ul = null; - if(w && w.end){ - ul = w.slant ? `color-mix(in srgb, ${colorOf(w)} 45%, transparent)` : colorOf(w); - }else if(p){ - ul = p.end && !p.slant ? colorOf(p) - : `color-mix(in srgb, ${colorOf(p)} 55%, transparent)`; - } - if(ul) style += `box-shadow:inset 0 -2px 0 0 ${ul};`; - h += `${text}`; + // fills only: words paint their group color; phrase rhymes paint + // the stretches between, so multi-word matches still read as units + const alpha = w ? (w.end ? 24 : 15) : (p.end ? 18 : 12); + const color = w ? colorOf(w) : colorOf(p); + h += `${text}`; } } const m = meterToggle.checked && fresh && analysis.meter