aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/app-core.js
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-13 16:08:13 -0500
committerCraig Jennings <c@cjennings.net>2026-06-13 16:08:13 -0500
commitb88d7cb0ac5009736aa0998f3ea2933050c55b76 (patch)
treeaa756de19ddc9a63dc7858fcaac202babed07477 /scripts/theme-studio/app-core.js
parent547dc4eb5194a524a4738bdb4f2b1c36591c884b (diff)
downloaddotemacs-b88d7cb0ac5009736aa0998f3ea2933050c55b76.tar.gz
dotemacs-b88d7cb0ac5009736aa0998f3ea2933050c55b76.zip
Group numeric color names by stem
Diffstat (limited to 'scripts/theme-studio/app-core.js')
-rw-r--r--scripts/theme-studio/app-core.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/theme-studio/app-core.js b/scripts/theme-studio/app-core.js
index b3542bf7..5a7a14ab 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){name=name||'color';return /^color-\d+$/.test(name)?name:name.replace(/[+-]\d+$/,'');}
+function columnStem(name){name=name||'color';if(/^color-\d+$/.test(name))return name;name=name.replace(/[+-]\d+$/,'');return name.replace(/\d+$/,'')||'color';}
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]);}