mirror of
https://github.com/kennethreitz/rhymepad.org.git
synced 2026-06-11 17:08:33 +00:00
Dim internal fills (14%, phrases 10%)
Ends stay 34% — internals read as texture, not competition. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -534,7 +534,7 @@ function render(){
|
||||
if(!w && !p){ h += text; continue; }
|
||||
// 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 ? 34 : 19) : (p.end ? 24 : 14);
|
||||
const alpha = w ? (w.end ? 34 : 14) : (p.end ? 24 : 10);
|
||||
const color = w ? colorOf(w) : colorOf(p);
|
||||
h += `<span class="hseg" style="background:color-mix(in srgb, ${color} ${alpha}%, transparent);">${text}</span>`;
|
||||
}
|
||||
@@ -801,7 +801,7 @@ document.getElementById('exportBtn').addEventListener('click', async ()=>{
|
||||
const pt = phrases.find(t=>t.s <= a && b <= t.e);
|
||||
if(!wt && !pt) continue;
|
||||
const t = wt || pt;
|
||||
x.globalAlpha = wt ? (wt.end ? 0.34 : 0.19) : (pt.end ? 0.24 : 0.14);
|
||||
x.globalAlpha = wt ? (wt.end ? 0.34 : 0.14) : (pt.end ? 0.24 : 0.10);
|
||||
x.fillStyle = palette[groupInfo[t.g].color % COLORS];
|
||||
const x0 = PAD + x.measureText(line.slice(0, a)).width;
|
||||
const wpx = x.measureText(line.slice(a, b)).width;
|
||||
|
||||
Reference in New Issue
Block a user