@maccesar/titools 4.4.2 → 4.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -87,33 +87,20 @@ module.exports = {
87
87
  }
88
88
  },
89
89
  brand: {
90
- logos: {
91
- // Optional overrides. If omitted, PurgeTSS auto-discovers files from purgetss/brand/:
92
- // primary: './docs/logo.svg',
93
- // androidLauncher: './docs/app-icon.svg',
94
- // androidSplash: './docs/splash.svg',
95
- // monochrome: './docs/logo-mono.svg',
96
- // iosDark: './docs/logo-dark.svg',
97
- // iosTinted: './docs/logo-tinted.svg'
98
- },
99
- padding: {
100
- ios: '4%', // iOS aesthetic padding. Range 2-8%.
101
- androidLegacy: '10%', // legacy ic_launcher.png padding %
102
- androidAdaptive: '19%' // adaptive icon safe-zone %. Spec floor 19.44%.
103
- },
104
- android: {
105
- splash: false, // also generate splash_icon.png × 5
106
- notification: false // also generate ic_stat_notify.png × 5
107
- },
108
- ios: {
109
- dark: true, // emit DefaultIcon-Dark.png (set false to skip)
110
- tinted: true, // emit DefaultIcon-Tinted.png (set false to skip)
111
- darkBackground: null // null = transparent per Apple HIG; set a hex like '#111111' for an opaque dark bg
112
- },
113
- colors: {
114
- background: '#FFFFFF' // Android adaptive bg + iOS/marketplace flatten
115
- },
116
- confirmOverwrites: true // prompt before overwriting files (set false to skip)
90
+ background: '#FFFFFF', // inherited by every piece that doesn't set its own
91
+ confirmOverwrites: true, // prompt before overwriting files (set false to skip)
92
+ optimize: false, // true = quantize the generated PNGs to a palette (lossy)
93
+
94
+ // One block per piece — see the `brand` Command section for the full list.
95
+ icon: { padding: '4%' }, dark: { background: null }, tinted: {},
96
+ iosSplash: { padding: '26%' }, launchLogo: { padding: '12%' },
97
+ marketplace: {}, featureGraphic: { padding: '12%' },
98
+ adaptive: { padding: '18%' }, legacyIcon: { padding: '10%' },
99
+ appicon: {}, androidSplash: { padding: '26%' },
100
+
101
+ // Opt-in: inert until you edit the Android theme / FCM meta-data by hand.
102
+ splashIcon: { enabled: false }, notificationIcon: { enabled: false },
103
+ ninePatch: { enabled: false }
117
104
  },
118
105
  images: {
119
106
  quality: 85, // JPEG/WebP/AVIF quality (0-100)
@@ -204,16 +191,18 @@ Recommended VSCode extensions:
204
191
 
205
192
  ## `brand` Command
206
193
 
207
- Introduced in v7.6.0, restructured in v7.7.0. Generates the complete Titanium branding set (launcher icons, adaptive icons, iOS 18+ Dark/Tinted variants, marketplace artwork, optional notification/splash icons) from a single logo image — with optional Android-specific logo overrides when you need them. Alloy and Classic projects are auto-detected.
194
+ Introduced in v7.6.0, grouped config in v7.7.0, restructured into per-piece blocks in v7.13.0. Regenerates **every image the Titanium template ships**, from one main logo: launcher icons, adaptive icons, iOS 18+ Dark/Tinted variants, marketplace artwork, and both the iOS and Android splash sets. The rule is *if the template ships the file, `brand` updates it*. Each piece can take its own artwork, and `--only` narrows a run to the pieces you name. Alloy and Classic projects are auto-detected.
208
195
 
209
196
  > **Tip**
210
- > This is a quick reference. See [app-branding.md](./app-branding.md) for the complete guide — workflow, padding guidance, Android dark mode, iOS 18+ variants, alpha channel handling, and troubleshooting.
197
+ > This is a quick reference. See [app-branding.md](./app-branding.md) for the complete guide — workflow, padding guidance, Android dark mode, iOS 18+ variants, the launch-background setup, and troubleshooting. It also carries the full `brand:` config reference.
211
198
 
212
199
  ```bash
213
200
  purgetss brand # uses purgetss/brand/logo.{svg,png} + config
214
201
  purgetss brand path/to/logo.svg # positional logo path override
215
202
  ```
216
203
 
204
+ The 14 pieces, their config keys and what each one writes are tabulated in [app-branding.md → The pieces](./app-branding.md#the-pieces). Groups for `--only`: `ios` (icon, dark, tinted, ios-splash), `store` (marketplace, feature-graphic), `android` (adaptive, legacy-icon, appicon, android-splash).
205
+
217
206
  ### Flags
218
207
 
219
208
  **Project & output**
@@ -222,38 +211,60 @@ purgetss brand path/to/logo.svg # positional logo path override
222
211
  | --- | --- |
223
212
  | `--project <path>` | Project root (defaults to cwd). |
224
213
  | `--dry-run` | Preview what would be generated without writing any files. |
225
- | `--output <dir>` | Stage into `<dir>` instead of writing in place. |
214
+ | `-o, --output <dir>` | Stage into `<dir>` instead of writing in place. |
226
215
  | `-y, --yes` | Skip the overwrite confirmation prompt for this invocation. |
227
216
 
217
+ **Selecting what to generate**
218
+
219
+ | Flag | Purpose |
220
+ | --- | --- |
221
+ | `--only <pieces>` | Comma-separated pieces or groups. Generates a named piece even when its opt-in flag is absent; an unknown name aborts before writing anything. `--dry-run` honors the same filter. |
222
+
228
223
  **Visual customization**
229
224
 
230
225
  | Flag | Purpose |
231
226
  | --- | --- |
232
- | `--bg-color <hex>` | Background color for Android adaptive + iOS/marketplace flatten. |
233
- | `--padding <n>` | Shortcut: sets BOTH Android paddings to the same value for one run. Fixed in v7.10.0 — previously only fed `androidAdaptivePadding`, leaving `androidLegacyPadding` at its own config value. |
234
- | `--android-adaptive-padding <n>` | Adaptive icon safe-zone % (default `19`). |
227
+ | `--bg-color <hex>` | Background inherited by every piece that doesn't set its own. |
228
+ | `--padding <n>` | Shortcut: sets both Android launcher paddings to the same value for one run. |
229
+ | `--android-adaptive-padding <n>` | Adaptive icon safe-zone % (default `18`). |
235
230
  | `--android-legacy-padding <n>` | Legacy `ic_launcher.png` padding % (default `10`). |
236
- | `--ios-padding <n>` | iOS aesthetic padding % (range `2-8`, default `4`). |
237
- | `--feature-graphic-padding <n>` | (v7.10.0) Vertical padding for `MarketplaceArtworkFeature.png` (range `0-40`, default `12`). |
231
+ | `--ios-padding <n>` | Padding % for the four square iOS/marketplace pieces — `icon`, `dark`, `tinted`, `marketplace` (range `2-8`, default `4`). |
232
+ | `--feature-graphic-padding <n>` | Vertical padding % for `MarketplaceArtworkFeature.png` (range `0-40`, default `12`). |
233
+ | `--launch-logo-padding <n>` | Padding % for `LaunchLogo.png` (default `12`). |
234
+ | `--splash-padding <n>` | Shortcut: sets both splash paddings to the same value for one run. |
235
+ | `--android-splash-padding <n>` | Padding % for `default.png` and the 11 `res-*` splashes (default `26`). |
236
+ | `--ios-splash-padding <n>` | Padding % for the 16 iPhone launch images (default `26`). |
237
+
238
+ Splash padding is a share of the canvas's **shorter** side, so one number keeps the logo at the same visual weight in portrait and in landscape: the `26%` default leaves it at 48% of the shorter side.
238
239
 
239
240
  **Optional asset types**
240
241
 
241
242
  | Flag | Purpose |
242
243
  | --- | --- |
243
- | `--notification` | Also emit `ic_stat_notify.png × 5`. |
244
- | `--splash` | Also emit `splash_icon.png × 5`. |
244
+ | `--notification-icon` | Also emit `ic_stat_notify.png × 5`. |
245
+ | `--splash-icon` | Also emit `splash_icon.png × 5`. |
246
+ | `--nine-patch` | Declared but not implemented yet; prints a warning and writes nothing. |
245
247
 
246
248
  **Logo variants & overrides**
247
249
 
250
+ Every piece has a `--<piece>-logo <path>` flag — with no exceptions since v7.13.0 — each overriding the matching `purgetss/brand/logo-<piece>.{svg,png}`:
251
+
252
+ `--icon-logo`, `--dark-logo`, `--tinted-logo`, `--ios-splash-logo`, `--launch-logo`, `--marketplace-logo`, `--feature-graphic-logo`, `--adaptive-logo`, `--legacy-icon-logo`, `--appicon-logo`, `--android-splash-logo`, `--splash-icon-logo`, `--notification-icon-logo`.
253
+
254
+ `--launch-logo` is the one that also **activates** its piece. Two more sources are not pieces: `--monochrome-logo <path>` (the silhouette shared by the adaptive monochrome layer and the notification icons, `logo-mono.{svg,png}`) and the positional `<logo>` argument (the main logo).
255
+
256
+ **Output size**
257
+
258
+ | Flag | Purpose |
259
+ | --- | --- |
260
+ | `--optimize` | Re-encode every generated PNG with a quantized palette. Lossy, ~71% smaller on a full brand set. Also settable as `brand.optimize`. |
261
+ | `--no-optimize` | Skip that pass even when `brand.optimize` is `true`. |
262
+
263
+ **Appearance**
264
+
248
265
  | Flag | Purpose |
249
266
  | --- | --- |
250
- | `--icon-logo <path>` | Override `purgetss/brand/logo-icon.{svg,png}` for Android launcher icons (square mark for non-square main logos). |
251
- | `--monochrome-logo <path>` | Override `purgetss/brand/logo-mono.{svg,png}`. |
252
- | `--dark-logo <path>` | Override `purgetss/brand/logo-dark.{svg,png}`. |
253
267
  | `--dark-bg-color <hex>` | Opaque dark bg for `DefaultIcon-Dark.png` (default: transparent per Apple HIG). |
254
- | `--splash-logo <path>` | Override `purgetss/brand/logo-splash.{svg,png}` for Android 12+ splash artwork. |
255
- | `--tinted-logo <path>` | Override `purgetss/brand/logo-tinted.{svg,png}`. |
256
- | `--feature-logo <path>` | (v7.10.0) Override `purgetss/brand/logo-feature.{svg,png}` for the Google Play Feature Graphic (1024×500). |
257
268
  | `--no-dark` | Skip `DefaultIcon-Dark.png`. |
258
269
  | `--no-tinted` | Skip `DefaultIcon-Tinted.png`. |
259
270
 
@@ -261,59 +272,32 @@ purgetss brand path/to/logo.svg # positional logo path override
261
272
 
262
273
  | Flag | Purpose |
263
274
  | --- | --- |
264
- | `--cleanup-legacy` | Remove obsolete branding artifacts (reads `tiapp.xml` for safety rules). Keeps `default.png` on purpose. |
275
+ | `--cleanup-legacy` | Remove obsolete branding artifacts (reads `tiapp.xml` for safety rules). Keeps `default.png` on purpose, and never deletes what the same run just regenerated. |
265
276
  | `--aggressive` | With `--cleanup-legacy`, also remove `ldpi` density folders. |
266
277
 
267
278
  **Diagnostics**
268
279
 
269
280
  | Flag | Purpose |
270
281
  | --- | --- |
271
- | `--notes` | Print full `tiapp.xml` snippets + padding tuning guide. |
282
+ | `--notes` | Print the complete platform launch/theme snippets + padding tuning guide. |
272
283
  | `--debug` | Print extra diagnostics. |
273
284
 
285
+ > **Warning**
286
+ > Breaking renames in v7.13.0: `--splash` → `--splash-icon`, `--notification` → `--notification-icon`, `--splash-logo` → `--splash-icon-logo`, `--feature-logo` → `--feature-graphic-logo`. `--icon-logo` now feeds the `icon` piece; the Android launcher source is `--adaptive-logo`. `--legacy-splash` is gone. **No aliases were kept.**
287
+ >
288
+ > Also note `purgetss brand --help` still prints `default: 19` for `--android-adaptive-padding` and `default: 20` for the two splash paddings. Those help strings are stale — the pipeline applies `18`, `26` and `26`.
289
+
274
290
  ### Positional argument
275
291
 
276
- - `[logo-path]` (optional) — overrides auto-discovery of `purgetss/brand/logo.{svg,png}`.
292
+ - `[logo-path]` (optional) — overrides auto-discovery of `purgetss/brand/logo.{svg,png}`. It is the main logo, source for every piece that has no override.
277
293
 
278
- ### Config block (v7.7.0 grouped structure)
294
+ ### Config block (v7.13.0 per-piece structure)
279
295
 
280
- Defaults live under `brand:` in `purgetss/config.cjs` and are injected automatically:
296
+ Defaults live under `brand:` in `purgetss/config.cjs` and are injected automatically. The block has **one entry per piece**; each accepts the same four keys where they apply: `logo`, `padding` (never inherited), `background` (inherited from `brand.background`), `enabled`. Top-level: `background`, `confirmOverwrites`, `optimize`, `logo`, `monochromeLogo`.
281
297
 
282
- ```javascript
283
- brand: {
284
- logos: {
285
- // Optional overrides. If omitted, PurgeTSS auto-discovers files from purgetss/brand/:
286
- // primary: './docs/logo.svg',
287
- // androidLauncher: './docs/app-icon.svg',
288
- // androidSplash: './docs/splash.svg',
289
- // monochrome: './docs/logo-mono.svg',
290
- // iosDark: './docs/logo-dark.svg',
291
- // iosTinted: './docs/logo-tinted.svg',
292
- // featureGraphic: './docs/logo-feature.svg' // Google Play 1024×500 banner (v7.10.0)
293
- },
294
- padding: {
295
- ios: '4%', // iOS aesthetic padding. Range 2-8%.
296
- androidLegacy: '10%', // legacy ic_launcher.png padding %
297
- androidAdaptive: '19%', // adaptive icon safe-zone %. Spec floor 19.44%.
298
- featureGraphic: '12%' // MarketplaceArtworkFeature.png vertical padding (v7.10.0)
299
- },
300
- android: {
301
- splash: false, // also generate splash_icon.png × 5
302
- notification: false // also generate ic_stat_notify.png × 5
303
- },
304
- ios: {
305
- dark: true, // emit DefaultIcon-Dark.png (set false to skip)
306
- tinted: true, // emit DefaultIcon-Tinted.png (set false to skip)
307
- darkBackground: null // null = transparent per Apple HIG; set a hex like '#111' for an opaque dark bg
308
- },
309
- colors: {
310
- background: '#FFFFFF' // Android adaptive bg + iOS/marketplace flatten
311
- },
312
- confirmOverwrites: true // prompt before overwriting files
313
- }
314
- ```
298
+ An unknown key aborts the run before a single file is written. A `brand:` block written for an older PurgeTSS is **rewritten on disk** on the next run, carrying over every customized value.
315
299
 
316
- The recommended workflow is convention-first: drop files in `purgetss/brand/`, let auto-discovery pick them up. Treat `brand.logos.*` as optional overrides for one-off paths or when masters live outside `purgetss/brand/`.
300
+ Full annotated block and per-key reference: [app-branding.md → The `brand:` config section](./app-branding.md#the-brand-config-section) and [Older configs update themselves](./app-branding.md#older-configs-update-themselves). The recommended workflow is convention-first: drop files in `purgetss/brand/`, let auto-discovery pick them up, and use `config.cjs` only for a persistent override.
317
301
 
318
302
  ### Confirmation prompt
319
303
 
@@ -323,24 +307,24 @@ The recommended workflow is convention-first: drop files in `purgetss/brand/`, l
323
307
 
324
308
  ```bash
325
309
  purgetss brand # uses purgetss/brand/logo.svg + config
310
+ purgetss brand --only icon # just the DefaultIcon pair
311
+ purgetss brand --only ios,notification-icon # a group plus one opt-in piece
326
312
  purgetss brand --bg-color "#0B1326" # override bg color
327
- purgetss brand --icon-logo ./docs/app-icon.svg # dedicated square Android launcher mark
328
- purgetss brand --splash --splash-logo ./docs/splash.svg # custom Android 12+ splash artwork
329
- purgetss brand --feature-logo ./docs/feature.svg # custom Google Play Feature Graphic (v7.10.0)
330
- purgetss brand --feature-graphic-padding 8 # tighter Feature Graphic padding (v7.10.0)
331
- purgetss brand --notification --splash # add notification + splash
313
+ purgetss brand --adaptive-logo ./docs/app-icon.svg # dedicated square Android launcher mark
314
+ purgetss brand --splash-icon --splash-icon-logo ./docs/splash.svg # custom Android 12+ splash artwork
315
+ purgetss brand --launch-logo ./docs/wordmark.svg # iOS launch screen logotype
316
+ purgetss brand --feature-graphic-logo ./docs/feature.svg # custom Google Play Feature Graphic
317
+ purgetss brand --feature-graphic-padding 8 # tighter Feature Graphic padding
318
+ purgetss brand --notification-icon --splash-icon # add notification + splash icons
332
319
  purgetss brand --no-tinted # skip iOS 18+ tinted variant
320
+ purgetss brand --optimize # quantize the generated PNGs
333
321
  purgetss brand --dry-run # preview without writing
334
322
  purgetss brand --cleanup-legacy --dry-run # preview legacy cleanup
335
323
  ```
336
324
 
337
325
  ### Android output groups
338
326
 
339
- `brand` writes three Android-facing asset groups, each with a different job:
340
-
341
- - `ic_launcher*` for the app icon and the default Android 12+ system splash path
342
- - `splash_icon.png` when you pass `--splash` and want custom Android 12+ splash artwork
343
- - `default.png` as the older Titanium Android splash fallback (regenerated since v7.7.0)
327
+ `brand` writes four Android-facing asset groups with different jobs — `ic_launcher*`, `appicon.png`, `default.png` + `images/res-*/default.png`, and the opt-in `splash_icon.png`. What each one is actually read by is spelled out in [app-branding.md → What gets generated](./app-branding.md#what-gets-generated).
344
328
 
345
329
  ## `images` Command
346
330
 
@@ -50,26 +50,28 @@ module.exports = {
50
50
  }
51
51
  },
52
52
  brand: {
53
- logos: {}, // empty = auto-discovers from purgetss/brand/
54
- padding: {
55
- ios: '4%', // iOS aesthetic padding. Range 2-8%.
56
- androidLegacy: '10%', // legacy ic_launcher.png padding %
57
- androidAdaptive: '19%', // adaptive icon safe-zone %. Spec floor 19.44%.
58
- featureGraphic: '12%' // MarketplaceArtworkFeature.png vertical padding (v7.10.0)
59
- },
60
- android: {
61
- splash: false, // also generate splash_icon.png × 5
62
- notification: false // also generate ic_stat_notify.png × 5
63
- },
64
- ios: {
65
- dark: true, // generate DefaultIcon-Dark.png
66
- tinted: true, // generate DefaultIcon-Tinted.png
67
- darkBackground: null // null = transparent per Apple HIG
68
- },
69
- colors: {
70
- background: '#FFFFFF' // Android adaptive bg + iOS/marketplace flatten
71
- },
72
- confirmOverwrites: true // prompt before overwriting files (set false to skip)
53
+ background: '#FFFFFF', // inherited by every piece that doesn't set its own
54
+ confirmOverwrites: true, // prompt before overwriting files (set false to skip)
55
+ optimize: false, // true = quantize the generated PNGs to a palette (lossy, ~71% smaller)
56
+
57
+ // One block per piece. Artwork comes from purgetss/brand/logo-<piece>.{svg,png};
58
+ // these keys are for numbers, colors and activation. Padding is never inherited.
59
+ icon: { padding: '4%' }, // DefaultIcon.png + DefaultIcon-ios.png
60
+ dark: { background: null }, // DefaultIcon-Dark.png
61
+ tinted: {}, // DefaultIcon-Tinted.png
62
+ iosSplash: { padding: '26%' }, // assets/iphone/Default*.png × 16
63
+ launchLogo: { padding: '12%' }, // LaunchLogo.png (1024×1024)
64
+ marketplace: {}, // iTunesConnect.png + MarketplaceArtwork.png
65
+ featureGraphic: { padding: '12%' }, // MarketplaceArtworkFeature.png (1024×500)
66
+ adaptive: { padding: '18%' }, // ic_launcher_{foreground,background,monochrome}.png × 5 + ic_launcher.xml
67
+ legacyIcon: { padding: '10%' }, // ic_launcher.png × 5
68
+ appicon: {}, // appicon.png (128×128)
69
+ androidSplash: { padding: '26%' }, // assets/android/default.png + images/res-*/default.png × 11
70
+
71
+ // Opt-in: inert until you edit the Android theme / FCM meta-data by hand.
72
+ splashIcon: { enabled: false }, // drawable-*/splash_icon.png × 5
73
+ notificationIcon: { enabled: false }, // drawable-*/ic_stat_notify.png × 5
74
+ ninePatch: { enabled: false } // background.9.png (not implemented yet)
73
75
  },
74
76
  images: {
75
77
  autoSync: true, // false = SVG pipeline computes dims but doesn't write to images.files (v7.11.0)
@@ -96,35 +98,33 @@ The config file has four main sections: `purge`, `brand`, `images`, and `theme`.
96
98
 
97
99
  `brand:` and `images:` configure the matching CLI commands — see [CLI Commands: `brand`](./cli-commands.md#brand-command) and [CLI Commands: `images`](./cli-commands.md#images-command) for the full option lists. The rest of this page covers `purge` and `theme`.
98
100
 
99
- For `brand`, the structure is grouped by purpose (introduced in v7.7.0, refined since):
101
+ For `brand`, the structure is **one block per piece of artwork** (v7.13.0), each accepting the same four keys where they apply:
100
102
 
101
- - `logos`: optional path overrides when you do not want to rely on `purgetss/brand/` auto-discovery — including `featureGraphic` for the Google Play 1024×500 banner (v7.10.0)
102
- - `padding`: visual sizing for iOS, Android legacy, Android adaptive icons, and the Feature Graphic banner (v7.10.0)
103
- - `android`: Android-only optional outputs such as `splash_icon.png` and notification icons
104
- - `ios`: iOS-only variant toggles (`dark`, `tinted`) and the optional `darkBackground` color
105
- - `colors`: shared color settings such as the adaptive background and iOS flatten color
103
+ - `logo`: path to this piece's artwork, when it lives outside `purgetss/brand/`
104
+ - `padding`: inset per side, as a number or a percentage string like `'19%'` — **never inherited**
105
+ - `background`: hex color, or `null` for transparent — inherited from `brand.background`
106
+ - `enabled`: `false` turns a default piece off, `true` turns an opt-in piece on
106
107
 
107
- > **INFO — Pre-7.7.0 flat configs auto-migrate**
108
- > Since v7.10.2, projects on the flat `brand:` schema (`brand.padding: <number>`, `brand.iosPadding`, `brand.bgColor`, etc.) auto-migrate in memory on every run. The grouped key always wins when both forms coexist, and a one-time deprecation notice lists the migrated keys. Update `config.cjs` to the grouped schema to silence the notice. See [App Icons & Branding → Upgrading from pre-7.7.0 configs](./app-branding.md#upgrading-from-pre-7-7-0-configs).
108
+ Plus `brand.background`, `brand.confirmOverwrites`, `brand.optimize`, `brand.logo` (the main logo) and `brand.monochromeLogo`.
109
109
 
110
- For the property-by-property reference, see [Configurable Properties](./configurable-properties.md).
110
+ > **INFO — Older `brand:` blocks update themselves**
111
+ > A `brand:` block written for an earlier PurgeTSS is rewritten **on disk** to this structure on the next run, carrying over every value that had been customized and printing each one it moved. Both earlier shapes are recognized: the original flat keys and the v7.7.0 grouped sections (`logos` / `padding` / `android` / `ios` / `colors`). This replaced the in-memory translation used from v7.10.2 to v7.12.1. A key that belongs to no structure at all — a typo — aborts the run with the list of valid ones instead of being ignored. See [App Icons & Branding → Older configs update themselves](./app-branding.md#older-configs-update-themselves).
112
+
113
+ For the property-by-property reference, see [App Icons & Branding → Brand config reference](./app-branding.md#brand-config-reference) and [Configurable Properties](./configurable-properties.md).
111
114
 
112
115
  ### Overriding logo paths
113
116
 
114
- By default, PurgeTSS auto-discovers logo files from `purgetss/brand/`. If you want to use custom paths, add them to `brand.logos`:
117
+ By default, PurgeTSS auto-discovers logo files from `purgetss/brand/` — `logo.{svg,png}` for the main artwork and `logo-<piece>.{svg,png}` for a specific piece. If you want to use custom paths, set `logo` on the piece:
115
118
 
116
119
  ```javascript
117
120
  module.exports = {
118
121
  brand: {
119
- logos: {
120
- primary: './my-logos/main.svg', // overrides auto-discovered logo.svg
121
- androidLauncher: './my-logos/icon.svg', // overrides auto-discovered logo-icon.svg
122
- androidSplash: './my-logos/splash.svg', // overrides auto-discovered logo-splash.svg
123
- monochrome: './my-logos/mono.svg', // overrides auto-discovered logo-mono.svg
124
- iosDark: './my-logos/dark.svg', // overrides auto-discovered logo-dark.svg
125
- iosTinted: './my-logos/tinted.svg', // overrides auto-discovered logo-tinted.svg
126
- featureGraphic: './my-logos/feature.svg' // overrides auto-discovered logo-feature.svg (v7.10.0)
127
- }
122
+ logo: './my-logos/main.svg', // overrides auto-discovered logo.svg
123
+ monochromeLogo: './my-logos/mono.svg', // overrides auto-discovered logo-mono.svg
124
+ adaptive: { logo: './my-logos/adaptive.svg' }, // Android launcher mark
125
+ dark: { logo: './my-logos/dark.svg' }, // iOS 18+ dark variant
126
+ tinted: { logo: './my-logos/tinted.svg' }, // iOS 18+ tinted variant
127
+ featureGraphic: { logo: './my-logos/feature.svg' } // Google Play 1024×500 banner
128
128
  }
129
129
  };
130
130
  ```
@@ -0,0 +1,102 @@
1
+ # Matching the Launch Background
2
+
3
+ `brand.background` changes the pixels of the generated branding assets. It does **not** edit `tiapp.xml` or an Android theme. To carry the same color into the native launch surfaces — the iOS LaunchScreen and the Android launcher window — copy the configured value into the platform settings described here.
4
+
5
+ Run `purgetss brand --notes` after generating the assets to print this same setup with the project's current `brand.background` value already substituted. PurgeTSS only prints the guidance; it never edits either platform configuration automatically.
6
+
7
+ For the branding assets themselves, see [App Icons & Branding](./app-branding.md).
8
+
9
+ On iOS, set the background of the LaunchScreen generated by Titanium under `<ios>` in `tiapp.xml`:
10
+
11
+ ```xml
12
+ <ios>
13
+ <enable-launch-screen-storyboard>true</enable-launch-screen-storyboard>
14
+ <default-background-color>#0B1326</default-background-color>
15
+ </ios>
16
+ ```
17
+
18
+ On Android, **keep the app's existing theme unchanged**. Titanium assigns `Theme.Titanium` directly to the generated launcher Activity, so values added only to the `<application>` theme can be superseded by Titanium's API-specific splash theme. Put the launch colors in a dedicated child theme instead.
19
+
20
+ For an Alloy project, create `app/platform/android/res/values/splashscreen.xml`:
21
+
22
+ ```xml
23
+ <?xml version="1.0" encoding="utf-8"?>
24
+ <resources>
25
+ <!-- Change only this line when the brand background changes. -->
26
+ <color name="splashscreen_background">#0B1326</color>
27
+
28
+ <style name="Theme.SplashScreen" parent="@style/Theme.Titanium">
29
+ <!-- Android 12+ system splash -->
30
+ <item name="android:windowSplashScreenBackground">@color/splashscreen_background</item>
31
+
32
+ <!-- Native window before Titanium draws the first Window -->
33
+ <item name="android:windowBackground">@color/splashscreen_background</item>
34
+
35
+ <!-- Background attribute referenced by Titanium's base splash theme -->
36
+ <item name="android:colorBackground">@color/splashscreen_background</item>
37
+ </style>
38
+ </resources>
39
+ ```
40
+
41
+ Classic projects use `platform/android/res/values/splashscreen.xml` instead. The filename is only organizational. `Theme.SplashScreen` and `splashscreen_background` are fixed, generic resource names in this example, not placeholders derived from the app name — paste them unchanged, and when the brand color changes, edit only the `<color>` line.
42
+
43
+ There is one color resource but three theme attributes because each attribute has a different consumer:
44
+
45
+ - `android:windowSplashScreenBackground` directly colors the Android 12+ system splash.
46
+ - `android:windowBackground` colors the native launch window before Titanium renders its first Window, and covers the legacy launch path.
47
+ - `android:colorBackground` supplies the general background attribute used by Titanium 13.4's base splash theme. `Base.Theme.Titanium.Splash` uses it as the inherited Android 12+ splash color when no direct override exists, and for the launch status and navigation bars.
48
+
49
+ These are not three different colors or three separate splash screens. Pointing all three at `@color/splashscreen_background` keeps the launch surfaces synchronized while leaving one line to maintain.
50
+
51
+ `Theme.Titanium` is not the universal base theme for every Titanium Window. It is the theme Titanium assigns to the **launcher Activity**. During the Android build, Titanium connects it back to the theme already selected on `<application>` through this generated inheritance chain:
52
+
53
+ ```text
54
+ Theme.SplashScreen
55
+ └── Theme.Titanium
56
+ └── Base.Theme.Titanium.Splash
57
+ └── Theme.AppDerived
58
+ └── existing <application> theme
59
+ ```
60
+
61
+ That means an application theme such as `Theme.Titanium.DayNight.Solid.Fullscreen` remains in effect; the dedicated child only overrides the launch backgrounds. Assign `Theme.SplashScreen` to the launcher Activity, not to `<application>` or regular Titanium Windows.
62
+
63
+ If `brand.splashIcon.enabled` is `true` and you want the generated `splash_icon.png` instead of the launcher icon, add this item to the same style:
64
+
65
+ ```xml
66
+ <item name="android:windowSplashScreenAnimatedIcon">@drawable/splash_icon</item>
67
+ ```
68
+
69
+ Then assign the dedicated theme **only** to Titanium's launcher Activity in `tiapp.xml`:
70
+
71
+ ```xml
72
+ <android xmlns:android="http://schemas.android.com/apk/res/android">
73
+ <manifest>
74
+ <application android:theme="@style/YourExistingTheme">
75
+ <activity
76
+ android:name=".YourAppActivity"
77
+ android:theme="@style/Theme.SplashScreen"/>
78
+ </application>
79
+ </manifest>
80
+ </android>
81
+ ```
82
+
83
+ Keep every existing `<application>` attribute, including its `android:theme`. If `<application/>` is self-closing, expand it before adding the Activity child. Replace `.YourAppActivity` with the real launcher Activity name; an app named `My App` normally generates `.MyAppActivity`.
84
+
85
+ This does **not** create another Java Activity. The entry is a manifest override for the Activity Titanium already generates. If that Activity is already declared in `tiapp.xml` for orientation, deep links, or another setting, add `android:theme` to the existing element instead of pasting a duplicate declaration.
86
+
87
+ > **WARNING**
88
+ >
89
+ > Existing launcher Activity theme
90
+ > If the launcher Activity already has its own custom `android:theme`, do not replace it blindly. Either make `Theme.SplashScreen` inherit from that Activity theme, or merge the splash items into that launcher-only theme. This exception is different from modifying the general `<application>` theme.
91
+
92
+ `<resources>` cannot live inside `tiapp.xml`: Titanium merges the `<android><manifest>` subtree into `AndroidManifest.xml`, while Android compiles files under `res/values/` into a separate resource table.
93
+
94
+ > **INFO**
95
+ >
96
+ > Android versions below 12
97
+ > A solid `android:windowBackground` takes precedence over `default.png`, the `res-*/default.png` set, `background.png` or `background.9.png` during the legacy launch path. `brand` regenerates that artwork with your logo on every run, so if you want it to show, use a drawable or layer-list for `windowBackground` instead of a plain color, or drop the `windowBackground` item altogether.
98
+
99
+ ## See also
100
+
101
+ - [App Icons & Branding](./app-branding.md) — the `brand` command, its pieces and config.
102
+ - [`brand` command reference](./cli-commands.md#brand-command) — terse flag list, including `--notes`.