diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-13 15:48:59 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-13 15:48:59 -0500 |
| commit | e1ffc55fc0aab94ead5e65ba1fe29ea3c44befe5 (patch) | |
| tree | d3c54bec493bc589496721cc67273cbcdcf42ec9 /scripts/theme-studio/app-core.js | |
| parent | 1ed8426f5145e34b92ed9a5ca6f027d72fd0cca6 (diff) | |
| download | dotemacs-e1ffc55fc0aab94ead5e65ba1fe29ea3c44befe5.tar.gz dotemacs-e1ffc55fc0aab94ead5e65ba1fe29ea3c44befe5.zip | |
Treat legacy color names as base columns
Diffstat (limited to 'scripts/theme-studio/app-core.js')
| -rw-r--r-- | scripts/theme-studio/app-core.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/theme-studio/app-core.js b/scripts/theme-studio/app-core.js index df3f0c355..b3542bf79 100644 --- a/scripts/theme-studio/app-core.js +++ b/scripts/theme-studio/app-core.js @@ -136,7 +136,7 @@ function lMax(hue,chroma,fgSet,target){ function oklchOf(hex){return oklab2oklch(srgb2oklab(hex));} function nameOfHex(palette,hex){const p=palette.find(p=>p[0].toLowerCase()===hex.toLowerCase());return p?p[1]:null;} -function columnStem(name){return (name||'color').replace(/[+-]\d+$/,'');} +function columnStem(name){name=name||'color';return /^color-\d+$/.test(name)?name:name.replace(/[+-]\d+$/,'');} function columnOffset(name){const m=(name||'').match(/([+-]\d+)$/);return m?parseInt(m[1],10):0;} function columnIdOf(entry){return (entry&&entry[2])||columnStem(entry&&entry[1]);} |
