Skip to content

Catch subtle recolours: pixelmatch threshold 0.05 - #19

Merged
tmashara merged 1 commit into
mainfrom
fix-color-threshold
Oct 24, 2026
Merged

tmashara merged 1 commit into
mainfrom
fix-color-threshold

Conversation

@tmashara

Copy link
Copy Markdown
Owner

renderdiff scored a visible colour change as identical: Tailwind v4 pink-500 (#f6339a) vs v3 (#ec4899) has a YIQ delta of 117, below pixelmatch 0.1's cut-off of 352. Found in the case study.

  • PIXELMATCH.threshold 0.1 → 0.05 (cut-off ≈ 88).
  • New tint control: one swatch, the two pinks. Was clean, now one region naming background-color.
  • abs-vs-flex @375 broke authoring rule 2 (left: 50% and translate(-50%) both on .5); 0.1 hid it. Hero 342 / box 310 at mobile on both sides keeps it whole-pixel.
  • Case study: $R → "${R[@]}" (bash expanded only the first route), and a note on the fix.

No per-pixel threshold separates the two: the half-pixel border in abs-vs-flex has a larger delta than the pink. Checked on the case-study builds: 0.05 takes the blog from 4 to 10 differing routes, and the new ones are the pink button, links and tags.

lint, format, typecheck, unit (222) and visual (303) pass locally.

🤖 Generated with Claude Code

pixelmatch's 0.1 scored Tailwind v3 vs v4 pink-500 as identical. Adds a tint
control for it, keeps abs-vs-flex whole-pixel at 375 (its half-pixel centring
was hidden by the old threshold), and fixes the bash array in the case study.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@tmashara
tmashara merged commit 5c0011e into main Oct 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant