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