From 5fd1a5724a9bac478340b28e5ee11ee596fe9d8b Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Tue, 2 Jun 2026 10:24:19 -0400 Subject: [PATCH] fix(android): always use dominant swatch for NowPlaying background MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Operator framing: the cover art is the main feature of NowPlaying, not the background. A vibrant accent on the cover (small bright logo, sticker, stripe) should pop against the background, not be matched by it. The previous vibrant → muted → dominant fallback chain often picked a high-saturation accent that covered only a sliver of the cover, producing gradients that clashed with the actual image. Drop to dominantSwatch only — the majority-by-pixel-count color. If the palette resolves no dominant swatch (extremely rare; essentially uniform/empty bitmap) the held color stays on the previous track's dominant, matching the existing "keep previous on failure" docstring contract. --- .../fabledsword/minstrel/player/ui/DominantColor.kt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/java/com/fabledsword/minstrel/player/ui/DominantColor.kt b/android/app/src/main/java/com/fabledsword/minstrel/player/ui/DominantColor.kt index 4298a2dc..b4be6420 100644 --- a/android/app/src/main/java/com/fabledsword/minstrel/player/ui/DominantColor.kt +++ b/android/app/src/main/java/com/fabledsword/minstrel/player/ui/DominantColor.kt @@ -59,9 +59,14 @@ fun rememberDominantColor(coverUrl: String?): Color { val palette = withContext(Dispatchers.Default) { Palette.from(bitmap).generate() } - val swatch = palette.vibrantSwatch - ?: palette.mutedSwatch - ?: palette.dominantSwatch + // Always use the dominant (majority-by-pixel-count) swatch. + // The cover art is the main feature of this view; a vibrant + // accent on the cover should pop against the background, not + // be matched by it. Previously we tried vibrant first, which + // picked the highest-saturation swatch even when it covered + // a tiny fraction of the cover — small bright accents made + // the gradient feel disconnected from the actual image. + val swatch = palette.dominantSwatch if (swatch != null) { extracted = Color(swatch.rgb) }