Skip to content

store: logos on a luminance-picked light/dark tile#42

Merged
ralyodio merged 1 commit into
mainfrom
feat-store-icon-tile
Jul 7, 2026
Merged

store: logos on a luminance-picked light/dark tile#42
ralyodio merged 1 commit into
mainfrom
feat-store-icon-tile

Conversation

@ralyodio

@ralyodio ralyodio commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Problem

Extension listing logos are transparent PNGs, but the store rendered them with object-fit: cover over the gradient avatar background. Result: the logo's transparent areas revealed the teal→blue avatar gradient (reads muddy/purplish) and the logo itself got cropped. Visible on store/extension.html?slug=coinpay-wallet.

Fix

  • Render the logo contained (never cropped) in a small padded, bordered tile instead of cover over the gradient.
  • Pick the tile backdrop from the logo's own luminance: average the opaque pixels — a bright logo gets a dark tile, a dark logo a light tile. Fully-transparent or CORS-tainted icons fall back to dark (suits the store's dark theme). Icon-less listings keep the initials avatar.

Before/after (CoinPay logo, luminance 154/255 → dark tile):

Old: transparent logo bled into the teal→blue gradient, cropped.
New: mark contained on a clean dark tile.

Self-contained change to store.js + store.css; node --check clean. Luminance sampling runs client-side on a 24×24 canvas at render time.

🤖 Generated with Claude Code

Listing logos are transparent PNGs but were shown with object-fit:cover
over the gradient avatar, so the empty areas revealed the teal→blue
gradient (muddy/purplish) and the logo got cropped.

Render the logo contained (never cropped) in a padded, bordered tile and
choose the backdrop from the logo's own opaque-pixel luminance: bright
logos get a dark tile, dark logos a light tile (CORS-tainted/opaque-less
icons fall back to dark). Initials avatar is unchanged for icon-less
listings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ralyodio ralyodio merged commit 434459b into main Jul 7, 2026
3 checks passed
@ralyodio ralyodio deleted the feat-store-icon-tile branch July 7, 2026 10:31
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

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