aboutsummaryrefslogtreecommitdiff
path: root/tests/test-prog-python-setup.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-08 21:58:34 -0500
committerCraig Jennings <c@cjennings.net>2026-06-08 21:58:34 -0500
commit78269dae7dd445425e5ec0863b65ca768a4f76a3 (patch)
tree99fa2ab53cf5cdac2515e71d662926b3bfd7cc05 /tests/test-prog-python-setup.el
parent0f7088233bbfac2eb6b19d6ddcdc05c66f22e026 (diff)
downloaddotemacs-78269dae7dd445425e5ec0863b65ca768a4f76a3.tar.gz
dotemacs-78269dae7dd445425e5ec0863b65ca768a4f76a3.zip
refactor(theme-studio): extract plane and palette-ΔE logic into the tested core
The picker's two heaviest pieces of pure logic lived as strings inside generate.py, reachable only through the single-scenario browser hash tests. I moved them into colormath.js, where they get the same direct Node testing the color math has: planeCell(L,C,H) returns a C×L plane cell's color or flags it out of gamut, and paletteWarnings(palette, threshold, cap) does the pairwise ΔE analysis and returns the too-close pairs, the overflow count, and each color's nearest neighbor. The page now calls both. The inline copies are gone. The new Node tests cover what the hash tests never could: empty, single, and identical-color palettes; the strict threshold boundary; the cap and overflow count; closest-first ordering; the C=0 achromatic case; and a plane cell pinned to oklch2hex's clamped flag so the plane and the commit path agree on the gamut edge. The refactor preserves behavior: the page renders identically, guarded by the existing #deltatest and #planetest characterization gates.
Diffstat (limited to 'tests/test-prog-python-setup.el')
0 files changed, 0 insertions, 0 deletions