diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-10 00:16:11 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-10 00:16:11 -0500 |
| commit | 58bba0d9f037878e3c25bfcefef1bfa344d79048 (patch) | |
| tree | 11e62c55d6e8d4c148a3030f1f8787bcff7fb7d6 /scripts/setup-email.sh | |
| parent | 0baaaeb81f5e0e84de548ce3eaa526c18d91cedd (diff) | |
| download | dotemacs-58bba0d9f037878e3c25bfcefef1bfa344d79048.tar.gz dotemacs-58bba0d9f037878e3c25bfcefef1bfa344d79048.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/setup-email.sh')
0 files changed, 0 insertions, 0 deletions
