neiam
/apollos_crib
It's Apollo's Crib
public · Issues · Pulls 1 · Labels · Forks · Compare · Actions failure · Badges · Packages
⭐
Log in to mark this repository.
Android: stop Material filling the unset colour slots with its own purple
30a84b2 · Gabriel Morell · 2026-09-19 00:17
Message
{commit_body(@commit)}
Files changed
modified
clients/android/app/src/main/java/io/neiam/apolloscrib/ui/theme/AppTheme.kt
+24
−0
@@ -78,6 +78,18 @@ data class AppTheme(
| 78 | 78 | // it to `primary` so the theme's accent shows up at higher |
| 79 | 79 | // elevations rather than a generic purple. |
| 80 | 80 | surfaceTint = primary, |
| 81 | + // The rest of Material's slots, which it otherwise fills from its | |
| 82 | + // own baseline palette -- and that baseline is purple and dusty | |
| 83 | + // pink, so they show up as exactly the colours the theme does not | |
| 84 | + // contain. secondaryContainer is the one that bites: it paints the | |
| 85 | + // selected NavigationBar pill and selected chips, so a themed app | |
| 86 | + // with a bottom bar shows a purple pill on every theme. | |
| 87 | + secondaryContainer = primary, onSecondaryContainer = bg, | |
| 88 | + tertiary = accent, onTertiary = bg, | |
| 89 | + tertiaryContainer = cardBg, onTertiaryContainer = content, | |
| 90 | + inversePrimary = primary, | |
| 91 | + inverseSurface = content, inverseOnSurface = bg, | |
| 92 | + surfaceBright = cardBg, surfaceDim = bg, | |
| 81 | 93 | outline = dim, outlineVariant = dim.copy(alpha = 0.35f), |
| 82 | 94 | ) |
| 83 | 95 | } else { |
@@ -94,6 +106,18 @@ data class AppTheme(
| 94 | 106 | surfaceContainerHigh = cardBg, |
| 95 | 107 | surfaceContainerHighest = cardBg, |
| 96 | 108 | surfaceTint = primary, |
| 109 | + // The rest of Material's slots, which it otherwise fills from its | |
| 110 | + // own baseline palette -- and that baseline is purple and dusty | |
| 111 | + // pink, so they show up as exactly the colours the theme does not | |
| 112 | + // contain. secondaryContainer is the one that bites: it paints the | |
| 113 | + // selected NavigationBar pill and selected chips, so a themed app | |
| 114 | + // with a bottom bar shows a purple pill on every theme. | |
| 115 | + secondaryContainer = primary, onSecondaryContainer = bg, | |
| 116 | + tertiary = accent, onTertiary = bg, | |
| 117 | + tertiaryContainer = cardBg, onTertiaryContainer = content, | |
| 118 | + inversePrimary = primary, | |
| 119 | + inverseSurface = content, inverseOnSurface = bg, | |
| 120 | + surfaceBright = cardBg, surfaceDim = bg, | |
| 97 | 121 | outline = dim, outlineVariant = dim.copy(alpha = 0.35f), |
| 98 | 122 | ) |
| 99 | 123 | } |
Parents: 874c837