neiam
/waxx
waxx
public · Issues · Pulls · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
Log in to mark this repository.
Android: stop Material filling the unset colour slots with its own purple
719248a · Gabriel Morell · 2026-09-19 00:17
Message
{commit_body(@commit)}
Files changed
modified
android/app/src/main/java/org/neiam/waxx/app/ui/theme/AppTheme.kt
+24
−0
@@ -72,6 +72,18 @@ data class AppTheme(
| 72 | 72 | // `primary` so the theme's accent shows up there rather than |
| 73 | 73 | // a generic purple. |
| 74 | 74 | surfaceTint = primary, |
| 75 | + // The rest of Material's slots, which it otherwise fills from its | |
| 76 | + // own baseline palette -- and that baseline is purple and dusty | |
| 77 | + // pink, so they show up as exactly the colours the theme does not | |
| 78 | + // contain. secondaryContainer is the one that bites: it paints the | |
| 79 | + // selected NavigationBar pill and selected chips, so a themed app | |
| 80 | + // with a bottom bar shows a purple pill on every theme. | |
| 81 | + secondaryContainer = primary, onSecondaryContainer = bg, | |
| 82 | + tertiary = accent, onTertiary = bg, | |
| 83 | + tertiaryContainer = cardBg, onTertiaryContainer = content, | |
| 84 | + inversePrimary = primary, | |
| 85 | + inverseSurface = content, inverseOnSurface = bg, | |
| 86 | + surfaceBright = cardBg, surfaceDim = bg, | |
| 75 | 87 | outline = dim, outlineVariant = dim.copy(alpha = 0.35f), |
| 76 | 88 | ) |
| 77 | 89 | } else { |
@@ -88,6 +100,18 @@ data class AppTheme(
| 88 | 100 | surfaceContainerHigh = cardBg, |
| 89 | 101 | surfaceContainerHighest = cardBg, |
| 90 | 102 | surfaceTint = primary, |
| 103 | + // The rest of Material's slots, which it otherwise fills from its | |
| 104 | + // own baseline palette -- and that baseline is purple and dusty | |
| 105 | + // pink, so they show up as exactly the colours the theme does not | |
| 106 | + // contain. secondaryContainer is the one that bites: it paints the | |
| 107 | + // selected NavigationBar pill and selected chips, so a themed app | |
| 108 | + // with a bottom bar shows a purple pill on every theme. | |
| 109 | + secondaryContainer = primary, onSecondaryContainer = bg, | |
| 110 | + tertiary = accent, onTertiary = bg, | |
| 111 | + tertiaryContainer = cardBg, onTertiaryContainer = content, | |
| 112 | + inversePrimary = primary, | |
| 113 | + inverseSurface = content, inverseOnSurface = bg, | |
| 114 | + surfaceBright = cardBg, surfaceDim = bg, | |
| 91 | 115 | outline = dim, outlineVariant = dim.copy(alpha = 0.35f), |
| 92 | 116 | ) |
| 93 | 117 | } |
Parents: a1f8336