From 38dc4dc89cf5d220e81bf5d6e293f11aed7bd138 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 13 Jun 2026 18:32:49 -0500 Subject: Change theme studio spans to endpoint divisions --- scripts/theme-studio/palette-actions.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'scripts/theme-studio/palette-actions.js') diff --git a/scripts/theme-studio/palette-actions.js b/scripts/theme-studio/palette-actions.js index 7fbac701b..db91ed0aa 100644 --- a/scripts/theme-studio/palette-actions.js +++ b/scripts/theme-studio/palette-actions.js @@ -176,9 +176,8 @@ function renderPalette(){ sw.innerHTML=`
${m.hex}
`;gs.appendChild(sw);} }); } - // The too-similar warning stays on the full flat palette: a generated ramp's - // steps are a stepL apart (well above the warning's ΔE threshold), so they never - // trigger it, and any pair that does is a genuine near-duplicate worth flagging. + // The too-similar warning stays on the full flat palette, so large spans can + // still expose genuinely hard-to-distinguish neighboring colors. const ordered=sortColumns(columns); ordered.forEach((f,pos)=>{ const s=strip('');s.dataset.column=f.column||f.base; @@ -194,11 +193,11 @@ function renderPalette(){ function columnCountControl(f){ const per=Math.max(0,...rankByLightness(f.members.map(m=>m.hex),f.base).map(m=>Math.abs(m.offset))); const d=document.createElement('div');d.className='fcount'; - d.innerHTML=`span ± `; - d.querySelector('input').onchange=(e)=>setColumnCount(f.base,Math.max(0,Math.min(4,parseInt(e.target.value,10)||0))); + d.innerHTML=`span ± `; + d.querySelector('input').onchange=(e)=>setColumnCount(f.base,Math.max(0,Math.min(8,parseInt(e.target.value,10)||0))); return d; } -// Regenerate a column as a symmetric base ±N ramp, replacing its current members. +// Regenerate a column as a symmetric base ±N span, replacing its current members. // References to a surviving position (matched by signed lightness rank) follow the // new hex; references to a position removed by lowering N leave their old hex, // which is no longer in the palette and so renders as "(gone)". -- cgit v1.2.3