From e61b3fbebd5b4f4a8d96b3f1a6773ea8b1cf4030 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 16 Jul 2026 21:08:28 +0000 Subject: [PATCH] refactor: drop dead purple constants and fix FAB glyph contrast Two cleanup passes on the mobile theme: - Remove definition-only colour constants from Color.kt that had no references anywhere (the Primary50..80 purple ramp, DEFAULT_PRIMARY, LIGHT_PURPLE, Purple700, FollowsFollow, NIP05Verified, the base Nip05EmailColor, DarkerGreen and LighterRedColor). - Point the "new item" FloatingActionButton glyphs at onPrimary instead of a hardcoded Color.White. With a light accent in the dark theme the container is a pale pastel, so a white glyph was low-contrast; onPrimary resolves to the correct high-contrast on-colour in both themes. Only FAB glyphs on a primary container were changed; white icons on dark overlays were left as-is. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01D1F9jXNwRGTP8qmsV3Wd69 --- .../screen/loggedIn/articles/NewArticleButton.kt | 3 +-- .../ui/screen/loggedIn/badges/NewBadgeButton.kt | 3 +-- .../loggedIn/calendars/NewCalendarButton.kt | 9 ++++----- .../loggedIn/chats/rooms/ChannelFabColumn.kt | 3 +-- .../screen/loggedIn/chess/NewChessGameButton.kt | 3 +-- .../communities/NewCommunityNoteButton.kt | 3 +-- .../communities/list/NewCommunityButton.kt | 3 +-- .../ui/screen/loggedIn/discover/DiscoverScreen.kt | 5 ++--- .../screen/loggedIn/geohash/NewGeoNoteButton.kt | 3 +-- .../loggedIn/hashtag/NewHashtagNoteButton.kt | 3 +-- .../ui/screen/loggedIn/home/NewNoteButton.kt | 3 +-- .../screen/loggedIn/longs/NewLongVideoButton.kt | 9 ++++----- .../screen/loggedIn/music/NewMusicPlaylistFab.kt | 3 +-- .../screen/loggedIn/music/NewMusicTrackButton.kt | 3 +-- .../screen/loggedIn/pictures/NewPictureButton.kt | 9 ++++----- .../ui/screen/loggedIn/podcasts/PodcastsScreen.kt | 3 +-- .../ui/screen/loggedIn/polls/NewPollButton.kt | 3 +-- .../screen/loggedIn/products/NewProductButton.kt | 3 +-- .../loggedIn/publicChats/NewPublicChatButton.kt | 3 +-- .../screen/loggedIn/relay/NewRelayNoteButton.kt | 3 +-- .../screen/loggedIn/shorts/NewShortVideoButton.kt | 9 ++++----- .../ui/screen/loggedIn/url/NewUrlNoteButton.kt | 3 +-- .../ui/screen/loggedIn/video/NewImageButton.kt | 11 +++++------ .../screen/loggedIn/workouts/NewWorkoutButton.kt | 3 +-- .../com/vitorpamplona/amethyst/ui/theme/Color.kt | 15 --------------- 25 files changed, 41 insertions(+), 80 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/articles/NewArticleButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/articles/NewArticleButton.kt index eaa6d05c72..e5d419b4ec 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/articles/NewArticleButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/articles/NewArticleButton.kt @@ -24,7 +24,6 @@ import androidx.compose.foundation.shape.CircleShape import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.commons.icons.symbols.Icon import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols @@ -46,7 +45,7 @@ fun NewArticleButton(nav: INav) { symbol = MaterialSymbols.Add, contentDescription = stringRes(id = R.string.new_long_form_post), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/badges/NewBadgeButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/badges/NewBadgeButton.kt index 209be6fe91..ea9017c3fd 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/badges/NewBadgeButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/badges/NewBadgeButton.kt @@ -29,7 +29,6 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue -import androidx.compose.ui.graphics.Color import androidx.lifecycle.viewmodel.compose.viewModel import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.ui.painterRes @@ -63,7 +62,7 @@ fun NewBadgeButton(accountViewModel: AccountViewModel) { painter = painterRes(R.drawable.ic_compose, 5), contentDescription = stringRes(id = R.string.new_badge), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/calendars/NewCalendarButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/calendars/NewCalendarButton.kt index c4b0981c20..1d44af0116 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/calendars/NewCalendarButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/calendars/NewCalendarButton.kt @@ -37,7 +37,6 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.commons.icons.symbols.Icon @@ -74,7 +73,7 @@ fun NewCalendarButton(nav: INav) { // string is ambiguous out of context. contentDescription = stringRes(R.string.calendar_fab_new_collection), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } @@ -93,7 +92,7 @@ fun NewCalendarButton(nav: INav) { symbol = MaterialSymbols.Add, contentDescription = stringRes(R.string.calendar_fab_new_event), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } @@ -116,7 +115,7 @@ fun NewCalendarButton(nav: INav) { symbol = MaterialSymbols.Close, contentDescription = stringRes(R.string.calendar_fab_toggle), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } @@ -130,7 +129,7 @@ fun NewCalendarButton(nav: INav) { // Top FAB toggles the sub-FABs in/out — describe that, not the sub-action. contentDescription = stringRes(R.string.calendar_fab_toggle), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/rooms/ChannelFabColumn.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/rooms/ChannelFabColumn.kt index 34f60218c3..20fb4dfed2 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/rooms/ChannelFabColumn.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/rooms/ChannelFabColumn.kt @@ -26,7 +26,6 @@ import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.commons.icons.symbols.Icon @@ -54,7 +53,7 @@ fun ChannelFabColumn(nav: INav) { symbol = MaterialSymbols.Add, contentDescription = stringRes(R.string.messages_create_public_private_chat_description), modifier = Modifier.size(26.dp), - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/NewChessGameButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/NewChessGameButton.kt index d9ce5c8fdb..15e0b68109 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/NewChessGameButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/NewChessGameButton.kt @@ -24,7 +24,6 @@ import androidx.compose.foundation.shape.CircleShape import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.commons.icons.symbols.Icon import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols @@ -48,7 +47,7 @@ fun NewChessGameButton(onClick: () -> Unit) { symbol = MaterialSymbols.Add, contentDescription = stringRes(R.string.new_chess_game), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/communities/NewCommunityNoteButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/communities/NewCommunityNoteButton.kt index 0bb6305ed6..348afee567 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/communities/NewCommunityNoteButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/communities/NewCommunityNoteButton.kt @@ -25,7 +25,6 @@ import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.model.Note import com.vitorpamplona.amethyst.ui.components.LoadNote @@ -70,7 +69,7 @@ fun NewCommunityNoteButton( painter = painterRes(R.drawable.ic_compose, 2), contentDescription = stringRes(id = R.string.new_community_note), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/communities/list/NewCommunityButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/communities/list/NewCommunityButton.kt index c8187a63ae..b9f5273384 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/communities/list/NewCommunityButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/communities/list/NewCommunityButton.kt @@ -24,7 +24,6 @@ import androidx.compose.foundation.shape.CircleShape import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.commons.icons.symbols.Icon import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols @@ -46,7 +45,7 @@ fun NewCommunityButton(nav: INav) { symbol = MaterialSymbols.Add, contentDescription = stringRes(id = R.string.new_community), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/discover/DiscoverScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/discover/DiscoverScreen.kt index 84ce056f9a..833e843078 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/discover/DiscoverScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/discover/DiscoverScreen.kt @@ -48,7 +48,6 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.vitorpamplona.amethyst.R @@ -370,7 +369,7 @@ fun NewProductButton( symbol = MaterialSymbols.Add, contentDescription = stringRes(id = R.string.new_product), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } @@ -392,7 +391,7 @@ fun NewLongFormMarkdownButton( symbol = MaterialSymbols.Add, contentDescription = stringRes(id = R.string.new_long_form_post), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/geohash/NewGeoNoteButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/geohash/NewGeoNoteButton.kt index e7071436f0..b8f0906a1d 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/geohash/NewGeoNoteButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/geohash/NewGeoNoteButton.kt @@ -25,7 +25,6 @@ import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.ui.navigation.navs.INav import com.vitorpamplona.amethyst.ui.navigation.routes.Route @@ -53,7 +52,7 @@ fun NewGeoPostButton( painter = painterRes(R.drawable.ic_compose, 1), contentDescription = stringRes(id = R.string.new_community_note), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/hashtag/NewHashtagNoteButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/hashtag/NewHashtagNoteButton.kt index 46bbbeda5a..8d02bac91c 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/hashtag/NewHashtagNoteButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/hashtag/NewHashtagNoteButton.kt @@ -25,7 +25,6 @@ import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.ui.navigation.navs.INav import com.vitorpamplona.amethyst.ui.navigation.routes.Route @@ -53,7 +52,7 @@ fun NewHashtagPostButton( painter = painterRes(R.drawable.ic_compose, 3), contentDescription = stringRes(id = R.string.new_community_note), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/home/NewNoteButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/home/NewNoteButton.kt index 298d5f5263..3d3574924e 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/home/NewNoteButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/home/NewNoteButton.kt @@ -29,7 +29,6 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.vitorpamplona.amethyst.R @@ -66,7 +65,7 @@ fun NewNoteButton(nav: INav) { painter = painterRes(R.drawable.ic_compose, 4), contentDescription = stringRes(R.string.new_post), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/longs/NewLongVideoButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/longs/NewLongVideoButton.kt index b446229a66..f3b13641dc 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/longs/NewLongVideoButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/longs/NewLongVideoButton.kt @@ -40,7 +40,6 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp import androidx.lifecycle.viewmodel.compose.viewModel import com.vitorpamplona.amethyst.R @@ -130,7 +129,7 @@ fun NewLongVideoButton( symbol = MaterialSymbols.Videocam, contentDescription = stringRes(id = R.string.record_a_video), modifier = Modifier.size(26.dp), - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } @@ -149,7 +148,7 @@ fun NewLongVideoButton( symbol = MaterialSymbols.AddPhotoAlternate, contentDescription = stringRes(id = R.string.upload_image), modifier = Modifier.size(26.dp), - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } @@ -172,7 +171,7 @@ fun NewLongVideoButton( symbol = MaterialSymbols.Close, contentDescription = stringRes(id = R.string.new_long_video), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } @@ -185,7 +184,7 @@ fun NewLongVideoButton( painter = painterRes(R.drawable.ic_compose, 5), contentDescription = stringRes(id = R.string.new_long_video), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/music/NewMusicPlaylistFab.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/music/NewMusicPlaylistFab.kt index 65b4d39f78..3b002a1cf6 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/music/NewMusicPlaylistFab.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/music/NewMusicPlaylistFab.kt @@ -24,7 +24,6 @@ import androidx.compose.foundation.shape.CircleShape import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color import androidx.compose.ui.tooling.preview.Preview import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.commons.icons.symbols.Icon @@ -52,7 +51,7 @@ fun NewMusicPlaylistFab(nav: INav) { symbol = MaterialSymbols.AutoMirrored.PlaylistAdd, contentDescription = stringRes(R.string.new_music_playlist), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/music/NewMusicTrackButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/music/NewMusicTrackButton.kt index 9d05b125dd..ef3dcfdb93 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/music/NewMusicTrackButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/music/NewMusicTrackButton.kt @@ -24,7 +24,6 @@ import androidx.compose.foundation.shape.CircleShape import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color import androidx.compose.ui.tooling.preview.Preview import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.commons.icons.symbols.Icon @@ -54,7 +53,7 @@ fun NewMusicTrackButton( symbol = MaterialSymbols.MusicNote, contentDescription = stringRes(R.string.new_music_track), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/pictures/NewPictureButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/pictures/NewPictureButton.kt index e1fbd437c7..4521e82df0 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/pictures/NewPictureButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/pictures/NewPictureButton.kt @@ -40,7 +40,6 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp import androidx.lifecycle.viewmodel.compose.viewModel import com.vitorpamplona.amethyst.R @@ -130,7 +129,7 @@ fun NewPictureButton( symbol = MaterialSymbols.CameraAlt, contentDescription = stringRes(id = R.string.take_a_picture), modifier = Modifier.size(26.dp), - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } @@ -149,7 +148,7 @@ fun NewPictureButton( symbol = MaterialSymbols.AddPhotoAlternate, contentDescription = stringRes(id = R.string.upload_image), modifier = Modifier.size(26.dp), - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } @@ -172,7 +171,7 @@ fun NewPictureButton( symbol = MaterialSymbols.Close, contentDescription = stringRes(id = R.string.new_picture), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } @@ -185,7 +184,7 @@ fun NewPictureButton( painter = painterRes(R.drawable.ic_compose, 5), contentDescription = stringRes(id = R.string.new_picture), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/podcasts/PodcastsScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/podcasts/PodcastsScreen.kt index ec3685bbfc..0a5471bd9b 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/podcasts/PodcastsScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/podcasts/PodcastsScreen.kt @@ -26,7 +26,6 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue -import androidx.compose.ui.graphics.Color import androidx.compose.ui.tooling.preview.Preview import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.vitorpamplona.amethyst.R @@ -101,7 +100,7 @@ fun PodcastsScreen( Icon( symbol = MaterialSymbols.Mic, contentDescription = stringRes(R.string.podcast_your_podcast), - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/polls/NewPollButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/polls/NewPollButton.kt index 8172c942a5..62dbedf6d5 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/polls/NewPollButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/polls/NewPollButton.kt @@ -25,7 +25,6 @@ import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.ui.navigation.navs.INav import com.vitorpamplona.amethyst.ui.navigation.routes.Route @@ -46,7 +45,7 @@ fun NewPollButton(nav: INav) { painter = painterRes(R.drawable.ic_compose, 4), contentDescription = stringRes(id = R.string.new_poll), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/products/NewProductButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/products/NewProductButton.kt index 5de13885cb..17f154ebfb 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/products/NewProductButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/products/NewProductButton.kt @@ -24,7 +24,6 @@ import androidx.compose.foundation.shape.CircleShape import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.commons.icons.symbols.Icon import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols @@ -52,7 +51,7 @@ fun NewProductButton( symbol = MaterialSymbols.Add, contentDescription = stringRes(id = R.string.new_product), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/publicChats/NewPublicChatButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/publicChats/NewPublicChatButton.kt index 4347f862ca..f13e94a04b 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/publicChats/NewPublicChatButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/publicChats/NewPublicChatButton.kt @@ -24,7 +24,6 @@ import androidx.compose.foundation.shape.CircleShape import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.commons.icons.symbols.Icon import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols @@ -46,7 +45,7 @@ fun NewPublicChatButton(nav: INav) { symbol = MaterialSymbols.Add, contentDescription = stringRes(id = R.string.new_public_chat), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relay/NewRelayNoteButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relay/NewRelayNoteButton.kt index 592aa4cd03..748a1806d8 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relay/NewRelayNoteButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relay/NewRelayNoteButton.kt @@ -25,7 +25,6 @@ import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.ui.navigation.navs.INav import com.vitorpamplona.amethyst.ui.navigation.routes.Route @@ -52,7 +51,7 @@ fun NewRelayNoteButton( painter = painterRes(R.drawable.ic_compose, 3), contentDescription = stringRes(id = R.string.new_community_note), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/shorts/NewShortVideoButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/shorts/NewShortVideoButton.kt index f8c5a9a59f..264102f79c 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/shorts/NewShortVideoButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/shorts/NewShortVideoButton.kt @@ -40,7 +40,6 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp import androidx.lifecycle.viewmodel.compose.viewModel import com.vitorpamplona.amethyst.R @@ -130,7 +129,7 @@ fun NewShortVideoButton( symbol = MaterialSymbols.Videocam, contentDescription = stringRes(id = R.string.record_a_video), modifier = Modifier.size(26.dp), - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } @@ -149,7 +148,7 @@ fun NewShortVideoButton( symbol = MaterialSymbols.AddPhotoAlternate, contentDescription = stringRes(id = R.string.upload_image), modifier = Modifier.size(26.dp), - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } @@ -172,7 +171,7 @@ fun NewShortVideoButton( symbol = MaterialSymbols.Close, contentDescription = stringRes(id = R.string.new_short_video), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } @@ -185,7 +184,7 @@ fun NewShortVideoButton( painter = painterRes(R.drawable.ic_compose, 5), contentDescription = stringRes(id = R.string.new_short_video), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/url/NewUrlNoteButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/url/NewUrlNoteButton.kt index cecf7e0950..913642da1c 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/url/NewUrlNoteButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/url/NewUrlNoteButton.kt @@ -25,7 +25,6 @@ import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.ui.navigation.navs.INav import com.vitorpamplona.amethyst.ui.navigation.routes.Route @@ -53,7 +52,7 @@ fun NewUrlPostButton( painter = painterRes(R.drawable.ic_compose, 1), contentDescription = stringRes(id = R.string.new_community_note), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/video/NewImageButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/video/NewImageButton.kt index abd23e7cf0..e8d254eb0a 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/video/NewImageButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/video/NewImageButton.kt @@ -40,7 +40,6 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp import androidx.lifecycle.viewmodel.compose.viewModel import com.vitorpamplona.amethyst.R @@ -144,7 +143,7 @@ fun NewImageButton( symbol = MaterialSymbols.CameraAlt, contentDescription = stringRes(id = R.string.take_a_picture), modifier = Modifier.size(26.dp), - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } @@ -163,7 +162,7 @@ fun NewImageButton( symbol = MaterialSymbols.Videocam, contentDescription = stringRes(id = R.string.record_a_video), modifier = Modifier.size(26.dp), - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } @@ -182,7 +181,7 @@ fun NewImageButton( symbol = MaterialSymbols.AddPhotoAlternate, contentDescription = stringRes(id = R.string.upload_image), modifier = Modifier.size(26.dp), - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } @@ -207,7 +206,7 @@ fun NewImageButton( symbol = MaterialSymbols.Close, contentDescription = stringRes(id = R.string.new_short), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } @@ -220,7 +219,7 @@ fun NewImageButton( painter = painterRes(R.drawable.ic_compose, 5), contentDescription = stringRes(id = R.string.new_short), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/workouts/NewWorkoutButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/workouts/NewWorkoutButton.kt index 945ab25509..8cbe58f87c 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/workouts/NewWorkoutButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/workouts/NewWorkoutButton.kt @@ -24,7 +24,6 @@ import androidx.compose.foundation.shape.CircleShape import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.commons.icons.symbols.Icon import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols @@ -46,7 +45,7 @@ fun NewWorkoutButton(nav: INav) { symbol = MaterialSymbols.Add, contentDescription = stringRes(id = R.string.new_workout), modifier = Size26Modifier, - tint = Color.White, + tint = MaterialTheme.colorScheme.onPrimary, ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Color.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Color.kt index 6ca1574e84..047ea2941e 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Color.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Color.kt @@ -24,17 +24,8 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.ColorFilter import androidx.compose.ui.graphics.ColorMatrix -val Primary50 = Color(red = 127, green = 103, blue = 190) -val Primary60 = Color(red = 154, green = 130, blue = 219) -val Primary70 = Color(red = 182, green = 157, blue = 248) -val Primary80 = Color(red = 208, green = 188, blue = 255) - -val DEFAULT_PRIMARY = Color(red = 208, green = 188, blue = 255) -val LIGHT_PURPLE = Color(red = 187, green = 134, blue = 252) - val Purple200 = Color(0xFFBB86FC) val Purple500 = Color(0xFF6200EE) -val Purple700 = Color(0xFF3700B3) val Teal200 = Color(0xFF03DAC5) // Accent palette options selected through Settings -> Accent Color. @@ -56,17 +47,11 @@ val BitcoinDark = Color(0xFFF7931A) val BitcoinLight = Color(0xFFB66605) val Following = Color(0xFF03DAC5) -val FollowsFollow = Color.Yellow -val NIP05Verified = Color.Blue -val Nip05EmailColor = Color(0xFFb198ec) val Nip05EmailColorDark = Color(0xFF765AA2) val Nip05EmailColorLight = Color(0xFFa770f3) -val DarkerGreen = Color.Green.copy(alpha = 0.32f) - val LightRedColor = Color(0xFFC62828) -val LighterRedColor = Color(0xFFFF0E0E) val RelayIconFilter = ColorFilter.colorMatrix(ColorMatrix().apply { setToSaturation(0.5f) })