Use a logo that is visible on a white page - #10
Merged
Conversation
The README shipped the white logo, so on PyPI it rendered as white on white: the wordmark was invisible and all a reader saw was a stray dot. The file names are the trap. simantic_logo_4_full_transparent.png is the light one (mean luminance 252, for dark backgrounds) and the file called "inverted" is the dark one (luminance 3). Uses a <picture>, so both cases are right rather than trading one for the other. GitHub honours the dark-scheme <source> and shows the white logo in dark mode; PyPI's sanitiser drops <source> and keeps the <img>, which is the dark logo on their white page. Verified against readme_renderer, the library PyPI renders with. Bumped to 0.3.1 because a release's description on PyPI cannot be edited after upload; the page only changes when a new version is published.
Rather than serve two files by colour scheme, use the variant that carries its own black card. It renders the same on PyPI's white page and on GitHub in dark mode, so there is one image and nothing to keep in sync.
test_version_matches_pyproject caught the half-done bump: pyproject said 0.3.1 while simantic.__version__ still said 0.3.0. That test exists because a release tags one version and two sources of truth drift silently.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 0.3.0 README shipped the white logo, so on PyPI it rendered white on white. The wordmark vanished and a reader saw a stray dot floating above the tagline.
The file names are the trap. Measured mean luminance of the visible (non-transparent) pixels:
simantic_logo_4_full_transparent.pngsimantic_logo_4_inverted_full_transparent.pngsimantic_logo_4_full.pngBoth transparent files only work on one background: the dark one is barely legible in GitHub's dark mode, the light one is invisible on PyPI. Serving them by colour scheme with a
<picture>works, but it means two files to keep in sync for a logo.simantic_logo_4_full.pngcarries its own black card, so a single<img>renders identically on PyPI's white page and on GitHub in dark mode. One file, nothing conditional, nothing to keep in sync.Bumped to 0.3.1, because a release's description on PyPI is immutable after upload. The 0.3.0 page keeps the invisible logo no matter what lands on main; only a new version changes what people see.