aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/app-core.js
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-13 15:48:59 -0500
committerCraig Jennings <c@cjennings.net>2026-06-13 15:48:59 -0500
commitc74c60dcb6df932c6002668f79c363a07cd60238 (patch)
tree32c141bcbb9263382b4981fcfce239ecf6f95772 /scripts/theme-studio/app-core.js
parent1230868b8e271519530527e1d58be7cdd0f5647c (diff)
downloaddotemacs-c74c60dcb6df932c6002668f79c363a07cd60238.tar.gz
dotemacs-c74c60dcb6df932c6002668f79c363a07cd60238.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.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 df3f0c35..b3542bf7 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]);}