diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-19 11:23:25 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-19 11:23:25 -0400 |
| commit | d32553aa1a8cd49a514a347558524c98eb566627 (patch) | |
| tree | ea20cfabadc920de8eb56074b2f6487ae35dd121 /scripts/theme-studio/test-contrast.mjs | |
| parent | 569a539bea5e14acd91c6ddd0fdae01ee4bc6912 (diff) | |
| download | dotemacs-d32553aa1a8cd49a514a347558524c98eb566627.tar.gz dotemacs-d32553aa1a8cd49a514a347558524c98eb566627.zip | |
refactor(theme-studio): dedup the palette harvest and color-pair walks
generate.py's add_default_palette_colors repeated the same fg/bg/box-color harvest three times (syntax, ui, package faces); it now calls one _harvest_spec_colors helper, preserving the add order so the palette and generated page are byte-identical. default_faces' _build_color_hex and _build_color_names each walked the same faces -> chosen/effective -> foreground/background/distantForeground nesting; both now consume one _iter_color_pairs generator and only differ in their key choice and filter. The rebuilt color maps match the originals exactly.
I left the lower-value generate.py items (a build() wrapper, dict-driven fill_data) and the capture/face-coverage script dedups for later: they touch import-time behavior or scripts the suite doesn't run, so they want their own verification rather than riding this change.
Diffstat (limited to 'scripts/theme-studio/test-contrast.mjs')
0 files changed, 0 insertions, 0 deletions
