From 2299d034aed1c0993fae990fcf3ddaad3bae7c97 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 14 Jun 2026 19:08:33 -0500 Subject: fix(theme-studio): keep dropdown color names legible The color-picker popup colored each row's name and hex for contrast against the swatch, but the rows sit on the popup's fixed dark background. A mid or dark swatch (the blues past blue-1) got near-black text that vanished on the dark popup. The text now inherits the popup foreground for every real palette color. Only the solid "default" row, whose background is the color itself, still contrasts against its own fill. I moved the decision into dropdownRowTextColor with unit coverage, including a dark-swatch regression case. --- scripts/theme-studio/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/theme-studio/app.js') diff --git a/scripts/theme-studio/app.js b/scripts/theme-studio/app.js index 4b331c555..5056a7be8 100644 --- a/scripts/theme-studio/app.js +++ b/scripts/theme-studio/app.js @@ -83,7 +83,7 @@ function mkColorDropdown(options,cur,onPick,opts={}){ const pop=document.createElement('div');pop.className='cddpop'; for(const [hex,name] of options){const row=document.createElement('div');row.className='cddrow'+(hex===cur?' sel':''); const shown=displayHex(hex),nm=hex?name:(opts.defaultName||name); - row.style.background=hex?'':shown;row.style.color=shown?textOn(shown):''; + row.style.background=hex?'':shown;row.style.color=dropdownRowTextColor(hex,shown,textOn); row.innerHTML=`${esc(nm)}${hex||shown||''}`; row.onclick=(ev)=>{ev.stopPropagation();cur=hex;paint();closeColorDropdown();onPick(hex);}; pop.appendChild(row);} -- cgit v1.2.3