aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/palette-generator-core.js
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-24 18:10:38 -0400
committerCraig Jennings <c@cjennings.net>2026-06-24 18:10:38 -0400
commit721ed551c7d22f0ab5855e8c2e7c2d9264147e92 (patch)
tree51fbdc5bce32446d44d6160a930225f7c2c21ad8 /scripts/theme-studio/palette-generator-core.js
parent40c3a4d6dada84ad0686cdcff11cbe667468cae3 (diff)
downloaddotemacs-721ed551c7d22f0ab5855e8c2e7c2d9264147e92.tar.gz
dotemacs-721ed551c7d22f0ab5855e8c2e7c2d9264147e92.zip
refactor(theme-studio): tier-1 simplification pass
These are behavior-preserving cleanups from the refactor/simplify assessment, all test-verified. I merged syncMockHeight and syncPkgHeight into one syncPaneHeight(tableId, paneId), inlined the two single-use displayHex/displayName closures, dropped a pkgbody guard that buildPkgTable already does, and had paintUI call worstCellHtml instead of rebuilding the covered-contrast cell. I deleted the dead generatorHues "manual" branch (a copy of the fallback) and locateInfoLine (orphaned when I removed the preview info line earlier today). The two nerd-icons loaders now share _load_nerd_icons_artifact, with a sentinel so a null-file edge keeps its exact behavior. face_coverage.classify reads through named locals now, guarded by a new characterization test. Two assessment findings were wrong and skipped after I checked them against the code: LOCATE_REG is live (read by previewSpan), and normalizePaletteEntryCore doesn't exist.
Diffstat (limited to 'scripts/theme-studio/palette-generator-core.js')
-rw-r--r--scripts/theme-studio/palette-generator-core.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/theme-studio/palette-generator-core.js b/scripts/theme-studio/palette-generator-core.js
index 6ad2bf44f..033fff373 100644
--- a/scripts/theme-studio/palette-generator-core.js
+++ b/scripts/theme-studio/palette-generator-core.js
@@ -50,8 +50,7 @@ function generatorHues(baseHue,scheme,count,rng){
const offsets=[0,120,240,30,150,270,60,180,300,90,210,330];
return offsets.slice(0,n).map(o=>(b+o)%360);
}
- if(scheme==='manual')return Array.from({length:n},(_,i)=>(b+(i*360)/n)%360);
- return Array.from({length:n},(_,i)=>(b+(i*360)/n)%360);
+ return Array.from({length:n},(_,i)=>(b+(i*360)/n)%360); // even spread (manual/default/unknown)
}
function generatorChroma(mode){
return mode==='subdued'?0.055:mode==='vivid'?0.13:0.085;