mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 23:21:59 +01:00
rotate warm artwork hues out of the brown/olive range for dark tones
This commit is contained in:
@@ -155,6 +155,44 @@ class AppScreenshotTest {
|
||||
composeRule.onRoot().captureRoboImage("src/test/screenshots/library_with_mini_player.png")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun libraryWithMiniPlayerWarm() {
|
||||
composeRule.setContent {
|
||||
SubtracksTheme {
|
||||
val artwork = artworkColorsFromSeed(Color.rgb(222, 150, 30))
|
||||
Column(Modifier.fillMaxSize()) {
|
||||
LibraryScreen(
|
||||
selectedTab = LibraryTab.Albums,
|
||||
onTabSelected = {},
|
||||
albums = remember { flowOf(PagingData.from(Fixtures.albums)) }.collectAsLazyPagingItems(),
|
||||
artists = remember { flowOf(PagingData.from(Fixtures.artists)) }.collectAsLazyPagingItems(),
|
||||
songs = remember { flowOf(PagingData.from(Fixtures.songItems)) }.collectAsLazyPagingItems(),
|
||||
playlists = remember { flowOf(PagingData.from(Fixtures.playlists)) }.collectAsLazyPagingItems(),
|
||||
coverArt = { id, _ -> id?.let { CoverArtRef(it, "test:$it") } },
|
||||
onAlbumClick = {},
|
||||
onArtistClick = {},
|
||||
onPlaylistClick = {},
|
||||
onSongClick = {},
|
||||
onSync = {},
|
||||
onOpenSettings = {},
|
||||
artwork = artwork,
|
||||
modifier = Modifier.weight(1f),
|
||||
)
|
||||
MiniPlayer(
|
||||
state = Fixtures.playbackState(),
|
||||
coverArt = CoverArtRef("art-al-kid-a", "test:art-al-kid-a"),
|
||||
artwork = artwork,
|
||||
onExpand = {},
|
||||
onPlayPause = {},
|
||||
onNext = {},
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
awaitTag(ALBUM_COVER_TAG)
|
||||
composeRule.onRoot().captureRoboImage("src/test/screenshots/library_with_mini_player_warm.png")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun albumDetail() {
|
||||
composeRule.setContent {
|
||||
|
||||
@@ -59,6 +59,19 @@ class ArtworkColorsTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun warmHuesKeepDarkSurfacesOutOfBrown() {
|
||||
val warmSeeds = listOf(0xFFE6C822.toInt(), 0xFFE68A22.toInt(), 0xFFD53A3A.toInt())
|
||||
for (seed in warmSeeds) {
|
||||
val colors = artworkColorsFromSeed(seed)
|
||||
assertTrue("gradientHigh for $seed", colors.gradientHigh.blue >= colors.gradientHigh.green)
|
||||
assertTrue(
|
||||
"surfaceContainerHigh for $seed",
|
||||
colors.scheme.surfaceContainerHigh.blue >= colors.scheme.surfaceContainerHigh.green,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun contrast(
|
||||
a: Color,
|
||||
b: Color,
|
||||
|
||||
Reference in New Issue
Block a user