diff --git a/assets/brand/README.md b/assets/brand/README.md index ada5f1318..0ef5f1f73 100644 --- a/assets/brand/README.md +++ b/assets/brand/README.md @@ -11,6 +11,7 @@ assets/brand/ ├── master/ tight-cropped, alpha-correct, native-res masters (checked in) ├── mask/ grayscale luminance masks for dynamic UI tinting (checked in) ├── derived/ sized/format variants for app/web/installer (gitignored; built) +├── social/ the one checked-in derived image: the GitHub social preview └── build.py orchestrates master + mask + derived generation ``` @@ -31,6 +32,11 @@ and `derived/`. Idempotent. - **`mask/`** — grayscale masks for dynamically tinting the logo at runtime in the UI. See `mask/README.md` for the three flavors of dynamic-tint and Leptos usage. +- **`social/`** — `hypercolor-social.png`, the 1280x640 repository social + preview (the luminary field with the mark over the wordmark). GitHub has + no API for it, so it is uploaded by hand under Settings, General, Social + preview; regenerate with `uv run assets/brand/build.py` and copy + `derived/social/github-social.png` here when the masters change. - **`derived/`** — final sized/format outputs: Tauri app icon set, Windows ICO, favicons, OG images, WiX/NSIS installer BMPs, social avatars. Regenerated on release, not edited by hand. The Windows installer assets are also mirrored diff --git a/assets/brand/build.py b/assets/brand/build.py index 26258fe88..7d5637b3b 100644 --- a/assets/brand/build.py +++ b/assets/brand/build.py @@ -824,14 +824,23 @@ def build_social() -> None: bg.paste(h_scaled, ((1500 - target_w) // 2, (500 - target_h) // 2), h_scaled) bg.convert("RGB").save(out / "twitter-banner.png") - # GitHub org banner 1280x640 + # GitHub org banner 1280x640. Fit by width first: the horizontal lockup + # is wider than 4:1, so a height-only fit ran past both edges. bg = radial_gradient((1280, 640), inner=(35, 15, 70), outer=VOID_BLACK).convert("RGBA") - target_h = 360 - target_w = int(hw * target_h / hh) - h_scaled = h_lockup.resize((target_w, target_h), Image.LANCZOS) - bg.paste(h_scaled, ((1280 - target_w) // 2, (640 - target_h) // 2), h_scaled) + h_scaled = _fit_width(h_lockup, int(1280 * 0.84)) + if h_scaled.height > 360: + h_scaled = _fit_height(h_lockup, 360) + bg.paste(h_scaled, ((1280 - h_scaled.width) // 2, (640 - h_scaled.height) // 2), h_scaled) bg.convert("RGB").save(out / "github-banner.png") + # GitHub repository social preview 1280x640: the luminary nebula field + # with the mark over the glowing wordmark. This is the image the repo + # Settings page takes under Social preview; the checked-in copy at + # social/hypercolor-social.png is regenerated from here. + _luminary_vertical( + 1280, 640, mark_wf=0.28, mark_y=0.11, wm_wf=0.58, wm_y=0.57, sparkles=160 + ).save(out / "github-social.png") + # Discord server icon 512 bg = radial_gradient((512, 512), inner=(35, 15, 70), outer=VOID_BLACK).convert("RGBA") mark_scaled = sq.resize((420, 420), Image.LANCZOS) diff --git a/assets/brand/social/hypercolor-social.png b/assets/brand/social/hypercolor-social.png new file mode 100644 index 000000000..94b41b09f Binary files /dev/null and b/assets/brand/social/hypercolor-social.png differ