aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/run-tests.sh
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-10 00:16:11 -0500
committerCraig Jennings <c@cjennings.net>2026-06-10 00:16:11 -0500
commitebe18d51ad99fe0a5916516c47d5dda3315e9add (patch)
tree8ac92eab954f2cfe230938c15373002a6481ee24 /scripts/theme-studio/run-tests.sh
parent4f4ceb3360e56ea2b1fb6f303c645a0b2205483c (diff)
downloaddotemacs-ebe18d51ad99fe0a5916516c47d5dda3315e9add.tar.gz
dotemacs-ebe18d51ad99fe0a5916516c47d5dda3315e9add.zip
feat(theme-studio): add the color-families model core
Four pure functions in app-core.js, all derived from the hex so renaming never moves a color. familiesFromPalette groups a flat palette into the ground strip (the bg/fg assignment hexes, pinned, de-duped) plus hue families: near-neutrals split off by a chroma threshold, the rest cluster by hue proximity with a 25-degree gap and a 360 wrap, each family's base its most-saturated member. regenFamily returns a family's symmetric ramp around the base (n=0 is the base alone, handled without ramp()'s 1-4 clamp). rankByLightness gives each current member a signed offset from the base, and stepRepointPlan maps old positions to new ones across a regenerate, listing the positions that drop out so the caller can leave their references a visible "(gone)". Phase 1 of the color-families spec, pure logic, no UI. 13 node tests cover the gap split/merge, neutrals, absent and de-duped ground hexes, n=0, lightness ranking, and the survivor/removed repoint split. Suite 78 to 91 green.
Diffstat (limited to 'scripts/theme-studio/run-tests.sh')
0 files changed, 0 insertions, 0 deletions