aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/test_generate.py
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-10 01:56:15 -0500
committerCraig Jennings <c@cjennings.net>2026-06-10 01:56:15 -0500
commit04b82bbe0d99b9ff4aa8d892e2d44046ccfdc85e (patch)
treec34f9d75c4d005f31df7e7b42fa2684c5a688531 /scripts/theme-studio/test_generate.py
parent980cbe1a3a7a3930690b7780ea2c6aa674e9f2a0 (diff)
downloaddotemacs-04b82bbe0d99b9ff4aa8d892e2d44046ccfdc85e.tar.gz
dotemacs-04b82bbe0d99b9ff4aa8d892e2d44046ccfdc85e.zip
feat(theme-studio): group families by lightness-conditioned complete linkage
Replace the hue-anchor bucketing and the tent neutral threshold with the model two independent reviews of color-sorting.org converged on (Codex and Fable, with Fable's harness measuring pairwise F1 0.63 → 0.96 on the real palette). Chromatic colors now cluster by complete-linkage agglomeration on a lightness-conditioned hue distance: hue must match tightly at equal lightness and may drift across a lightness gap, because a tonal ramp drifts in hue with lightness by design. A low-chroma noise term widens the tolerance where hue is ill-defined, and a chroma clause keeps a vivid accent out of a soft same-hue family. Complete linkage makes single-linkage chaining structurally impossible. The neutral threshold is floored at both ends instead of tapering to zero, which fixes two real defects: pale warm grays (gray+1, gray+2) that leaked into a color column, and pure white (C=0 at L=1) that evaded a zero threshold. On the sterling/distinguished palette this separates the gold and olive ramps (the green/yellow complaint), keeps the red and blue ramps whole including drifted tints, isolates intense-red, and consolidates every gray and steel into the neutral column. The one residual — pale yellow+2 lands on the olive ramp — is geometrically irreducible from the hex (it sits on the olive trajectory by nearest-neighbor, ramp-line fit, and eye); only its name says gold. That needs the deferred per-hex family-hint override. New node tests cover the gold/olive split, blue pale-tint cohesion, gray/white neutrality, intense-red isolation, and palette-order independence. The count gate now asserts the count action adds all ramp colors to the palette rather than that they all display in one family, since a chroma-eased extreme can sit at the neutral boundary.
Diffstat (limited to 'scripts/theme-studio/test_generate.py')
0 files changed, 0 insertions, 0 deletions