Skip to content

feat(brand): new Flet logo across the repo, generated from a single master - #6816

Open
FeodorFitsner wants to merge 4 commits into
mainfrom
flet-logo-update
Open

feat(brand): new Flet logo across the repo, generated from a single master#6816
FeodorFitsner wants to merge 4 commits into
mainfrom
flet-logo-update

Conversation

@FeodorFitsner

@FeodorFitsner FeodorFitsner commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Replaces the Flet logo everywhere it appears: brand masters, the shipped client's platform icon sets, the cookiecutter templates handed to every user app, the website, READMEs, and example/test fixtures.

What's here

New masters in media/logo/ - light lockup, dark lockup, symbol-only SVG, and a 1024px symbol PNG. New palette: #ff005f / #27b0f5 / #8c0075, wordmark #333333 light and #f2f2f2 dark.

A generator at .github/scripts/generate_brand_assets.py (PEP-723 + uv run, matching the existing generate_icons.py convention) derives all ~95 rasters from the one master via a data manifest:

uv run .github/scripts/generate_brand_assets.py --normalize   # clean new master SVGs
uv run .github/scripts/generate_brand_assets.py               # regenerate
uv run .github/scripts/generate_brand_assets.py --verify      # assert output

The previous assets were made by hand and by three different pipelines and had drifted - the Android mipmaps were chain-resized from a 192px source, and several outputs were off-centre. The generator crops the master to its tight alpha bbox and re-frames each output to an explicit fraction, always resampling from full resolution in one LANCZOS step. Output is byte-stable across runs.

Two Android bugs fixed along the way

The template's default images/icon.png framed the glyph at 0.729 of the canvas. It feeds both adaptive_icon_foreground (only the central 66.67% is guaranteed visible) and the Android 12 splash (clipped to a circle of the same ratio), so every flet build apk shipped a launcher icon clipped under circular masks.

It is now framed at 0.60 - measured h_frac 0.600, circle 0.649, both inside the 0.667 limit.

client/ deliberately keeps the larger 0.88 framing: it ships legacy launcher icons only, with no mipmap-anydpi-v26 and no foreground/background layers, so the safe zone does not apply and 0.60 would render visibly smaller than neighbouring apps. The split is encoded as CLIENT_ANDROID_FRAC with the reason in a comment.

Also corrected: loading-animation.png and splash_android.png are now centred (both were off-centre, making the CSS zoom animation drift), and iOS icons are written as mode RGB rather than RGBA-with-opaque-alpha.

Site, READMEs, colours

  • Navbar renders the lockup instead of symbol + separate "Flet" text, with a dark variant via srcDark. The navbar.title is removed so the wordmark isn't duplicated; the site-level title is untouched.
  • READMEs wrap the lockup in <picture> for GitHub dark theme. PyPI ignores <source> and falls back to the <img>, which is correct there.
  • PWA theme_color #0175C2 (Flutter's stock blue) -> #FF005F, in all four places it's defined. background_color stays #FFFFFF.

Verification

  • Generator --verify: 0 failures (iOS icons mode RGB, maskables fully opaque, .ico size lists intact, both logo.svg copies byte-identical)
  • flet-cli icon tests: 43 passed, unchanged - they synthesise their own PNG bytes and never read repo art
  • Integration tests: 9 passed, 1 skipped
  • Verified on the iOS simulator end to end: launch screen renders the new mark at 358x461, exactly 0.600 x 768

Follow-ups, not in this PR

  1. image/src_svg_url and examples/.../image/image_for_docs will fail once the website deploys. They fetch https://flet.dev/img/logo.svg, which still serves the old mark, so they pass today. Their goldens need regenerating after deploy.
  2. flet build pipeline defects, planned separately: flutter_launcher_icons hardcodes kFaviconSize = 16 so web/favicon.png always ships at 16x16, and flutter_native_splash receives the user's icon unpadded so user-supplied icons still clip on the Android 12 splash.
  3. The canvas example (examples/controls/core/canvas/flet_logo/) keeps its hardcoded beziers and still draws the old mark, by decision.
  4. client/ has no adaptive icon at all; adding one needs 5 foreground PNGs plus 2 XML files.

Note: 50a90610 Bump client version to 1.1.0 landed on this branch separately and is unrelated to the rebrand.

Summary by Sourcery

Replace the repository’s legacy Flet branding with centrally generated assets and apply the new identity consistently across clients, templates, website, documentation, and examples.

New Features:

  • Add a single-master brand asset generator that produces the repository’s platform icons, web assets, splash screens, and fixture images with verification support.
  • Introduce updated light, dark, and symbol-only Flet logo masters across product and documentation surfaces.
  • Support dark-mode logo presentation in the website navbar and project READMEs.

Bug Fixes:

  • Correct Android template icon framing to prevent clipping under adaptive-icon and Android 12 splash masks.
  • Centre loading and splash artwork and emit opaque iOS icon assets in the expected RGB format.
  • Update PWA theme colors from Flutter’s default blue to the new Flet brand pink.

Enhancements:

  • Consolidate brand asset generation and validation around explicit, consistent sizing and framing rules.

Documentation:

  • Refresh README, website, and publishing documentation with the new branding and PWA theme color.

Tests:

  • Add generator verification for generated asset presence, dimensions, transparency, ICO sizes, and synchronized SVG copies.

Adds the four brand masters and `.github/scripts/generate_brand_assets.py`,
which derives all ~95 platform rasters from a single 1024px symbol master via
a data manifest.

The previous assets were produced by hand and by three different pipelines, so
they had drifted: the Android mipmaps were chain-resized from a 192px source
(soft at large sizes) and several outputs were off-centre. The generator crops
the master to its tight alpha bbox and re-frames every output to an explicit
fraction, resampling from full resolution in one LANCZOS step, so a future
rebrand is a matter of dropping in new masters and re-running one command.

Modes:
  --normalize       clean freshly exported master SVGs (strips stale
                    presentation attributes, matches the two lockup canvases
                    so the navbar logo cannot jump on theme toggle)
  --verify          assert modes, sizes, .ico size lists, SVG copy parity
  --contact-sheet   every output over four backgrounds in one image

Output is byte-stable across runs given the pinned Pillow.
Output of `uv run .github/scripts/generate_brand_assets.py`. Covers the Flet
client (Android mipmaps, 21 iOS icons, 7 macOS, .ico, web), the cookiecutter
templates that ship to every user app, example/test fixtures and the website.

Fixes two Android defects in the template default icon, which previously
framed the glyph at 0.729 of the canvas:

* `adaptive_icon_foreground` guarantees only the central 66.67% is visible, so
  every `flet build apk` produced a launcher icon clipped under circular masks.
* The Android 12 splash clips `windowSplashScreenAnimatedIcon` to a circle of
  the same ratio.

The template default is now framed at 0.60 (measured h_frac 0.600, circle
0.649 - both inside the 0.667 limit). `client/` keeps the larger 0.88 framing:
it ships legacy launcher icons only, with no adaptive-icon layers, so the safe
zone does not apply and 0.60 would render visibly smaller than neighbouring
apps.

Also corrected along the way: `loading-animation.png` and `splash_android.png`
are now centred (both were off-centre, which made the CSS zoom animation drift),
and iOS icons are written as mode RGB rather than RGBA with opaque alpha.
Docusaurus navbar now renders the horizontal lockup instead of the symbol plus
a separate "Flet" text label, with a dark variant via `srcDark`. The navbar
`title` is removed so the wordmark is not shown twice; the site-level `title`
on line 11 is untouched.

READMEs wrap the lockup in `<picture>` so GitHub's dark theme gets the light
wordmark. PyPI ignores `<source>` and falls back to the `<img>`, which is the
behaviour we want there.

PWA `theme_color` moves from `#0175C2` (Flutter's stock blue, matching no Flet
brand colour) to `#FF005F`, the logo's primary pink, in all four places it is
defined. `background_color` stays `#FFFFFF`.

Also fixes a logo URL pointing at a dead `flet-widget` branch, replaces the
old-logo SVG markup inlined in `test_image.py`, and regenerates the two goldens
whose source art changed.

Note: `image/src_svg_url` and `examples/.../image/image_for_docs` fetch
https://flet.dev/img/logo.svg and so still render the old mark. They pass now
and will need their goldens regenerated once the website deploys.
Update the client app version in pubspec.yaml from 1.0.0+1 to 1.1.0 to reflect the new release version.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying flet-website-v2 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 50a9061
Status: ✅  Deploy successful!
Preview URL: https://9ddcf68a.flet-website-v2.pages.dev
Branch Preview URL: https://flet-logo-update.flet-website-v2.pages.dev

View logs

@Dejv311

Dejv311 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Hey @FeodorFitsner,
I have noticed the corners are not perfectly round. Is that intentional?

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.

2 participants