Playback errors slice + scrubber polish + various polish #74
@@ -59,9 +59,14 @@ fun rememberDominantColor(coverUrl: String?): Color {
|
|||||||
val palette = withContext(Dispatchers.Default) {
|
val palette = withContext(Dispatchers.Default) {
|
||||||
Palette.from(bitmap).generate()
|
Palette.from(bitmap).generate()
|
||||||
}
|
}
|
||||||
val swatch = palette.vibrantSwatch
|
// Always use the dominant (majority-by-pixel-count) swatch.
|
||||||
?: palette.mutedSwatch
|
// The cover art is the main feature of this view; a vibrant
|
||||||
?: palette.dominantSwatch
|
// 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) {
|
if (swatch != null) {
|
||||||
extracted = Color(swatch.rgb)
|
extracted = Color(swatch.rgb)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user