bread-theme: capture golden pywal palettes for reference wallpapers #29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Before replacing
wal, record what it produces today so the switch is measured against real pywal output.bread-theme/scripts/capture-goldens.pyrunswal -i <img> -n -qin an isolated HOME and records color1-6, pluswal_colors, the full ordered list from pywal's owngen_colors. The goldens are committed underbread-theme/tests/fixtures/golden/.#RRRRGGGGBBBB, and pywal's#.{6}keeps#RRRRGG.near-monochrome-16bit.pngpins that quirk, which the extractor reproduces on purpose.Part of epic PYWAL.
PR: #36
Captured golden color1-6 for 5 reference images (BOS default wallpaper downscaled + 4 synthetic: dark/moody, saturated/colourful, near-monochrome, bright/screenshot-like) via real wal -i in an isolated HOME. Committed under bread-theme/tests/fixtures/, feeding ECO-30's fidelity tests.
Review: changes requested (see bread-ecosystem#36, #36 (comment)).
tests/fixtures/golden/near-monochrome.jsonis not a valid golden. The fixture is a 16-bit grayscale PNG. ImageMagick'stxt:output prints 12-digit hex for it (#78F078F078F0), and pywal's#.{6}regex truncates that to#78F078. That is where the green and purple come from; it is not dithering. Regenerate the fixture as 8-bit, or document it as a pywal parsing bug bread-theme deliberately does not reproduce, and correct the comment at output.rs:658-668.Also replace the hue-family assertions (
assert_hue_family, output.rs:600-617, which passes if any one of six accents is within 45 degrees) with per-slot comparisons against the goldens. Add webp and gif fixtures.Rework happens on the existing branch feature/native-palette, and PR #36 stays open. Do not open a second PR for this key.
Rework pushed to the existing PR: #36 (commit
6e34f3b; summary at #36 (comment)).The goldens are now captured by bread-theme/scripts/capture-goldens.py. Each one holds color1-6 from real
wal -iin an isolated HOME, plus the fullwal_colorslist from pywal's own gen_colors. The near-monochrome diagnosis was right: it is pywal's#.{6}truncating 16-bit#RRRRGGGGBBBBoutput, not dithering. That fixture is kept as near-monochrome-16bit.png so the quirk (which the extractor reproduces) stays pinned, and near-monochrome.png is now 8-bit. New JPEG (baseline and progressive), WebP, BMP (24-bit and palette) and animated GIF fixtures were added.assert_hue_familyis gone: every fixture is asserted exactly, both per slot and on the full list.Second-round review: the goldens are correct. I re-captured them against real
wal -iin an isolated HOME, and all committed fixtures match every accent slot and the full colour list (96/96 accents including the jpeg/ fixtures and the BOS default). The tests assert exact per-slot and full-list values, which is observable behaviour, not a mirror of the implementation. This stays in review: it ships in bread-ecosystem#36, which is held for the ECO-30 allocation fix and is on the release train (the user merges it). Details: #36 (comment)