Skip to content

fix(web): ecosystem logos keep their shape and contrast - #195

Merged
Railly merged 1 commit into
mainfrom
railly/logo-prepare
Nov 17, 2026
Merged

Railly merged 1 commit into
mainfrom
railly/logo-prepare

Conversation

@Railly

@Railly Railly commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Problem

  • Square logos on a coloured or white background (social profile pictures, favicons) showed cropped in a wide tile. Their aspect was measured on the trimmed mark, but the untrimmed image was the one stored.
  • Dark logos on a white background were marked light, because the white raised the mean luminance, so they sat on an ink tile with a frame (Innova 62).

Changes

  • prepareLogo trims only transparent or white margins and keeps a coloured background whole. The aspect it reports is the stored file's.
  • A logo is light only when almost none of its visible pixels are non-white.
  • Tests for the three invariants: the stored aspect matches the file, a coloured background is kept, and white versus dark marks get the right tone.

Visual proof

Before (prod) and after, for the four reported orgs. Seedspace is now Growyard.

Before and after

Logos are trimmed only when their margin is transparent or white, so a square
image on a coloured background is no longer stretched into a wide tile and
cropped. The stored aspect is the stored file's. A logo counts as light only
when it is almost all white, so a dark mark on a white background stays on a
white tile.
@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hack0 Ready Ready Preview, v0 Nov 17, 2026 5:46am UTC

Request Review

@Railly
Railly merged commit 4b9c3f7 into main Nov 17, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 02f60375 Deployed Nov 17, 2026 by vercel[bot]
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