[worker] simplify image-derived piece palettes #205

Merged
eleith merged 1 commits from web/piece-palette into main 2026-11-10 19:17:56 +00:00

Summary

  • Replace Colorlip with the existing Sharp/libimagequant palette quantizer; remove the dependency.
  • Keep a straightforward image → swatches → palette → accessible text pipeline, without custom sampling or coverage rules.
  • Prefer prominent colorful swatches for backgrounds, retain image-derived accent/muted colors, and choose black/white text by contrast against the softened solid background.
  • Keep Preview/Publish workflow and embedded palette contracts unchanged; trim tests and document regeneration.

Validation

  • Code and test reviews complete.
  • 337 worker tests and coverage thresholds pass.
  • Clean production build, lint, formatting, diff check, manifest/lockfile consistency, and compiled palette smoke calculation pass.
  • Full test-inclusive type checking has 14 pre-existing diagnostics, identical to an isolated main/HEAD baseline; no new diagnostics.
  • Supplied cover produces blue #66849c with black text at 5.35:1 solid-background contrast.

Scope

Existing OG templates with translucent image overlays can still alter final rendered contrast; that visual template change is documented and deferred. No live Preview/Publish jobs, browser tests, or image inspection were run for this iteration.

## Summary - Replace Colorlip with the existing Sharp/libimagequant palette quantizer; remove the dependency. - Keep a straightforward image → swatches → palette → accessible text pipeline, without custom sampling or coverage rules. - Prefer prominent colorful swatches for backgrounds, retain image-derived accent/muted colors, and choose black/white text by contrast against the softened solid background. - Keep Preview/Publish workflow and embedded palette contracts unchanged; trim tests and document regeneration. ## Validation - Code and test reviews complete. - 337 worker tests and coverage thresholds pass. - Clean production build, lint, formatting, diff check, manifest/lockfile consistency, and compiled palette smoke calculation pass. - Full test-inclusive type checking has 14 pre-existing diagnostics, identical to an isolated main/HEAD baseline; no new diagnostics. - Supplied cover produces blue #66849c with black text at 5.35:1 solid-background contrast. ## Scope Existing OG templates with translucent image overlays can still alter final rendered contrast; that visual template change is documented and deferred. No live Preview/Publish jobs, browser tests, or image inspection were run for this iteration.
eleith-gitea-agent Bot added 1 commit 2026-11-10 18:43:09 +00:00
[worker] simplify image-derived piece palettes
ci/woodpecker/pr/web-worker Pipeline was successful
ci/woodpecker/push/web-worker Pipeline was successful
db04e94420
eleith merged commit db04e94420 into main 2026-11-10 19:17:56 +00:00
eleith deleted branch web/piece-palette 2026-11-10 19:17:56 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: eleith/luzzle#205