Skip to content

Logo system: org mark + project-mark generator (4 exemplars)#16

Closed
lesnik512 wants to merge 24 commits into
mainfrom
logo-system
Closed

Logo system: org mark + project-mark generator (4 exemplars)#16
lesnik512 wants to merge 24 commits into
mainfrom
logo-system

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Logo system for the modern-python org

A reproducible SVG logo kit: the org mark plus 3 exemplar project marks, generated from a small Python toolchain, with brand guidelines and org-site adoption.

Design spec: docs/superpowers/specs/2026-06-27-logo-system-design.md
Plan: docs/superpowers/plans/2026-06-28-logo-system.md

The marks

  • Org mark — two nested rounded-square "snakes" (outer green, middle gold) around a green core. Reads as Python (the python.org interlock, abstracted), a container/scope, and a dependency at the core. Two-band favicon (core dropped) for small sizes.
  • Project system — a shared green snake frame with one category-coded variable:
    • DI core (modern-di, that-depends) → gold monogram
    • modern-di-* integrations → framework-colored letters (e.g. fa)
    • templates → framework-colored stack glyph (distinct device from integration letters)
    • messaging → teal frame · utilities → amber frame
  • Exemplars produced this pass: org mark, modern-di, modern-di-fastapi, fastapi-sqlalchemy-template. The remaining ~13 repos follow the documented rules in a later pass.

How it's built

  • brand/build/ — color tokens, a fonttools text outliner (wordmarks/monograms are outlined paths, so they render without the font), geometry/SVG builders, and a renderer. Regenerate with uv run python -m brand.build.render.
  • Light/dark: the org mark auto-adapts via prefers-color-scheme; project marks ship explicit light/dark pairs (icon.svg / icon-dark.svg, etc.) for <picture> swaps. Framework inks are brightened for dark backgrounds (e.g. FastAPI #009688#2dd4bf).
  • Baked-color SVGs + rasterized PNGs (favicon.png, social.png) are emitted for og:image / non-browser rasterizers that don't resolve CSS variables.
  • JetBrains Mono (SIL OFL 1.1) is vendored with its license; the outlined-glyph logos are unencumbered.

Site adoption

  • New favicon wired into mkdocs.yml; homepage hero replaced with the generated stacked lockup. Palette CSS unchanged. The white nav-logo variant is a documented follow-up.

Verification

  • uv run pytest -q → 23 passed
  • uvx ty check brand tests → clean
  • uv run mkdocs build --strict → clean
  • All four marks visually verified (light + dark, favicon ladder, social card).

Known follow-ups (non-blocking)

  • Produce the remaining ~13 repo marks per the category table.
  • Verify/harmonize framework colors against each upstream brand (current values are reasonable starting points).
  • White nav-logo variant for the green site header.
  • Minor test cleanups (shared renderer fixture; a couple of dead .exists() asserts; widen dark-lockup coverage).

🤖 Generated with Claude Code

lesnik512 and others added 24 commits June 27, 2026 23:52
Org mark (nested rounded-square snakes + core) plus a project-mark system:
shared snake frame with category-colored frames, monograms, framework-colored
letters for modern-di integrations, and a stack glyph for templates. Covers the
org mark and 3 exemplars; full rollout deferred.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Lock wordmark (monospace lowercase, command-line primary + stacked secondary),
framework-color sourcing (upstream then harmonize), brand/ at repo root, two-band
favicon reduction, and 4-exemplar rollout scope.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Generated-SVG approach: canonical geometry/colors/token + fonttools text
outliner in brand/build/, a renderer that emits org + 3 exemplar kits, and
pytest structural validation. 10 tasks, TDD per task.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
OFL 1.1 requires the license + copyright notice accompany any redistribution
of the font file. The generated outlined-glyph logos are unencumbered (OFL
does not cover documents produced with the font).
Adds icon_inner(), lockup_horizontal(), lockup_stacked(), social_card()
to geometry.py. lockup_horizontal positions the wordmark via direct
outline_text coordinates (no post-hoc string patching); a single
_lockup_style() helper emits the combined --struct/--accent/--ink style.
Extract _org_inner/_monogram_inner/_template_inner so the standalone
icon functions and icon_inner() share one source each (outputs
byte-identical). Set ICON_SIZE_IN_LOCKUP to 96 and use it as the
canonical embedded-icon size in the lockups.
Add render.py entry point (python -m brand.build.render) that writes
five SVG files into brand/org/: icon, favicon, horizontal, stacked,
social. Test shells out to the entry point and validates each file
exists and parses as well-formed XML.
Add bake() to resolve CSS var() tokens to concrete colors and strip <style>
blocks, export_png() to rasterize via rsvg-convert with graceful degradation,
and emit icon-light.svg, icon-dark.svg, favicon.png (64x64), social.png (1280x640).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move geometry import to module level in tests/test_assets.py per the
imports-at-module-level house rule. Wrap the PNG export block in render_org()
in try/finally so scratch SVGs are always removed even if rsvg-convert fails.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add render_project() helper and dark_variant() to render.py; wire main()
to produce modern-di icon/icon-dark/horizontal/stacked SVGs. TDD: test
asserts gold monogram, aria-label, outlined text, dark-mode remap to
#3f8064 frame.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
TDD: test asserts aria-label, FastAPI teal (#009688) in icon.svg, no
<rect> (monogram not template), horizontal.svg validity, and that
dark_variant preserves the framework ink while remapping the frame to
#3f8064.
Add FRAMEWORK_DARK palette and extend dark_variant to remap framework
inks alongside GREEN/GOLD, so modern-di-fastapi's teal reads on dark
backgrounds instead of staying the muddy light #009688.
Adds template exemplar: green frame + 3-rect stack glyph in FastAPI teal,
proving the integration-vs-template device distinction. TDD: failing test
added first, then implementation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- svg() w/h params widened from int to float so lockup_horizontal's
  round(total_w, 1) is type-correct.
- render_project now writes horizontal-dark.svg and stacked-dark.svg
  for each project slug via dark_variant(bake(lockup, "dark")), giving
  README <picture> swap targets without touching org assets.
- 6 new generated SVGs (3 projects × 2 lockups).
- TDD: 3 new assertions in test_assets.py confirmed RED then GREEN.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Write brand/README.md: palette, org-mark geometry, project icon
  category table, light/dark file matrix, regenerate command, add-a-repo
  walkthrough, font license note.
- Fix two ty false-positives in brand/build/text.py (fontTools stubs):
  assert cmap is not None; ty: ignore on unresolved unitsPerEm attribute.
- Copy brand/org/favicon.svg to docs/assets/modern-python-favicon.svg
  and update mkdocs.yml theme.favicon to point at the new file.
- Replace the old corner-bracket wordmark SVG hero in docs/index.md with
  the generated stacked lockup (brand/org/stacked.svg), inlined with
  prefers-color-scheme dark-mode adaptation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
lockup_stacked hardcoded the SVG width to 128 (the icon size), clipping
the centered modern-python wordmark (~171.6px at fs 22) on both sides.
Width is now max(icon, wordmark) + 2*pad with both elements centered.

Adds a regression test asserting the stacked viewBox width is >= the
measured wordmark width. Regenerates org + project stacked SVGs (and dark
variants) and re-inlines the corrected org stacked lockup into the
homepage hero (viewBox now 0 0 195.6 140).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The prior re-inline used a non-greedy regex that stopped at the stacked
lockup's nested icon </svg>, leaving the old wordmark group in place and
producing two overlapping modern-python wordmarks on the landing page.
Replace the whole hero <svg> with the canonical brand/org/stacked.svg
(one wordmark group). Also remove the unused MANIFEST list in render.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace placeholder framework inks with verified upstream brand colors:
Litestar #edb641 (gold), FastStream #56b7e0 (cyan-blue), pytest #0a9edc
(royal blue); Typer logo is monochrome so a neutral slate is used. FastAPI
#009688 unchanged, so no generated mark changes. Add render_avatar(): a
1024x1024 white-background PNG of the org mark for the GitHub org profile.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
lesnik512 added a commit that referenced this pull request Jun 28, 2026
* brand: org favicon + social card kit

A deterministic brand toolchain (brand/build/) generating the org favicon,
GitHub/Telegram avatars, and og:image social cards from the approved
two-snakes + chevron mark and a Jost wordmark lockup, plus site wiring.

- brand/build/: green/cream/gold tokens; a fonttools Jost outliner (wordmark
  rendered as SVG paths, no font dependency at view time); geometry builders;
  a renderer emitting SVG + rsvg-rasterized PNG (PNGs skipped if rsvg absent).
- Icon: border-reaching snakes (square block head + diagonal-cut tail) around a
  gold chevron, square full-bleed; one mark for favicon / apple-touch / avatar,
  plus a padded avatar-circle for circular crops (Telegram).
- Social card: MODERN / PYTHON Jost lockup framed by the snakes; cream (primary)
  and green, 1280x640 og:image and a 640x640 square.
- Site: new favicon + og:image (1280x640) wired into mkdocs/overrides.

Design spec and plan under docs/superpowers/. Supersedes the snake mark in PR #16;
the homepage hero and header logo redesign are deferred.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* brand: straighten tail inner edge (quad overlap)

The seam-overlap fix moved the tail's inner vertex into the stroke, stepping
the body's inner edge. Use a 4-point tail that overlaps the stroke for the
seam but starts the inner diagonal at the body's inner corner, so the inner
line runs straight into the tail. Applies to icon and lockup tails.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lesnik512 lesnik512 closed this Jun 28, 2026
@lesnik512
lesnik512 deleted the logo-system branch June 28, 2026 17:46
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