Skip to content

assets: a GitHub avatar that survives dark mode - #433

Merged
zcsizmadia merged 1 commit into
mainfrom
assets/org-avatar
Sep 19, 2026
Merged

zcsizmadia merged 1 commit into
mainfrom
assets/org-avatar

Conversation

@zcsizmadia

@zcsizmadia zcsizmadia commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

The icon beside \wslkit / skrog\ is GitHub's auto-generated identicon — the org avatar was never set. No per-repo avatar exists and there is no upload API, so this generates the image; the upload stays manual.

\skrog-512.png\ is the obvious candidate and the wrong one. It is the bare mark on a transparent ground, and the mark is #2F3B45\ against a dark theme of #0d1117\ — it would very nearly disappear for every dark-theme visitor. An avatar is an <img>\ on whatever background the theme picked, with no styling hook, so it must carry its own contrast. \�vatar-512.png\ uses the opaque off-white ground the social card already uses.

Centred on the ink, not the raster box: a hull body plan sits low in its own square, and box-centring left it 13px low. Measured, not eyeballed — now 93/93 and 131/131. \writeAvatar\ measures rather than applying a constant, so it survives a geometry change.

Every other generated asset regenerates byte-identical, which is how I know the shared-\ground\ refactor changed nothing.

The icon beside 'wslkit / skrog' is GitHub's auto-generated identicon --
the org avatar was never set. There is no per-repository avatar and no
API to upload one, so this generates the image and the upload stays a
manual step.

skrog-512.png is the obvious candidate and the wrong one. It is the
bare mark on a TRANSPARENT ground, and the mark is #2F3B45 against a
dark theme of #0d1117: uploaded as an avatar it would very nearly
disappear for every dark-theme visitor. An avatar is an <img> on
whatever background the viewer's theme picked, with no styling hook to
fix that, so it has to carry its own contrast. avatar-512.png uses the
opaque off-white ground the social card already uses.

Centred on the INK rather than the raster box. A hull body plan sits
low in its own square, and box-centring left it 13px low -- measured,
not eyeballed, and now 93/93 horizontal and 131/131 vertical.
writeAvatar measures instead of applying a constant, so it stays
correct if the geometry in tools/internal/mark changes.

The off-white is now a shared ground var rather than a literal in
writeSocial, so the two cannot drift into two different whites. Every
other generated asset regenerates byte-identical, which is how I know
that refactor changed nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@zcsizmadia
zcsizmadia merged commit 73398b5 into main Sep 19, 2026
5 checks passed
@zcsizmadia
zcsizmadia deleted the assets/org-avatar branch September 19, 2026 13:47
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