diff --git a/screen/home/src/main/java/com/ivy/home/HomeMoreMenu.kt b/screen/home/src/main/java/com/ivy/home/HomeMoreMenu.kt
index a41db76190..b41d8b7903 100644
--- a/screen/home/src/main/java/com/ivy/home/HomeMoreMenu.kt
+++ b/screen/home/src/main/java/com/ivy/home/HomeMoreMenu.kt
@@ -445,21 +445,25 @@ private fun QuickAccess(
icon = when (theme) {
Theme.LIGHT -> R.drawable.home_more_menu_light_mode
Theme.DARK -> R.drawable.home_more_menu_dark_mode
+ Theme.AMOLED_DARK -> R.drawable.home_more_menu_amoled_dark_mode
Theme.AUTO -> R.drawable.home_more_menu_auto_mode
},
label = when (theme) {
Theme.LIGHT -> stringResource(R.string.light_mode)
Theme.DARK -> stringResource(R.string.dark_mode)
+ Theme.AMOLED_DARK -> stringResource(R.string.amoled_mode)
Theme.AUTO -> stringResource(R.string.auto_mode)
},
backgroundColor = when (theme) {
Theme.LIGHT -> UI.colors.pure
Theme.DARK -> UI.colors.pureInverse
+ Theme.AMOLED_DARK -> UI.colors.pureInverse
Theme.AUTO -> UI.colors.pure
},
tint = when (theme) {
Theme.LIGHT -> UI.colors.pureInverse
Theme.DARK -> UI.colors.pure
+ Theme.AMOLED_DARK -> UI.colors.pure
Theme.AUTO -> UI.colors.pureInverse
}
) {
diff --git a/screen/settings/src/main/java/com/ivy/settings/SettingsScreen.kt b/screen/settings/src/main/java/com/ivy/settings/SettingsScreen.kt
index 745152a4fb..033be64c08 100644
--- a/screen/settings/src/main/java/com/ivy/settings/SettingsScreen.kt
+++ b/screen/settings/src/main/java/com/ivy/settings/SettingsScreen.kt
@@ -281,11 +281,13 @@ private fun BoxWithConstraintsScope.UI(
icon = when (theme) {
Theme.LIGHT -> R.drawable.home_more_menu_light_mode
Theme.DARK -> R.drawable.home_more_menu_dark_mode
+ Theme.AMOLED_DARK -> R.drawable.home_more_menu_amoled_dark_mode
Theme.AUTO -> R.drawable.home_more_menu_auto_mode
},
label = when (theme) {
Theme.LIGHT -> stringResource(R.string.light_mode)
Theme.DARK -> stringResource(R.string.dark_mode)
+ Theme.AMOLED_DARK -> stringResource(R.string.amoled_mode)
Theme.AUTO -> stringResource(R.string.auto_mode)
}
) {
diff --git a/shared/base/src/main/java/com/ivy/base/legacy/Theme.kt b/shared/base/src/main/java/com/ivy/base/legacy/Theme.kt
index ab99ea0c7e..7dd2780e62 100644
--- a/shared/base/src/main/java/com/ivy/base/legacy/Theme.kt
+++ b/shared/base/src/main/java/com/ivy/base/legacy/Theme.kt
@@ -5,5 +5,5 @@ import androidx.compose.runtime.Immutable
@Deprecated("Old design system. Use `:ivy-design` and Material3")
@Immutable
enum class Theme {
- LIGHT, DARK, AUTO
+ LIGHT, DARK, AUTO, AMOLED_DARK
}
diff --git a/shared/ui/core/src/main/java/com/ivy/design/system/IvyMaterial3Theme.kt b/shared/ui/core/src/main/java/com/ivy/design/system/IvyMaterial3Theme.kt
index bf646fb29d..799b456579 100644
--- a/shared/ui/core/src/main/java/com/ivy/design/system/IvyMaterial3Theme.kt
+++ b/shared/ui/core/src/main/java/com/ivy/design/system/IvyMaterial3Theme.kt
@@ -8,10 +8,11 @@ import com.ivy.design.system.colors.IvyColors
@Composable
fun IvyMaterial3Theme(
dark: Boolean,
+ isTrueBlack: Boolean,
content: @Composable () -> Unit
) {
MaterialTheme(
- colorScheme = if (dark) ivyDarkColorScheme() else ivyLightColorScheme(),
+ colorScheme = if (dark) ivyDarkColorScheme(isTrueBlack) else ivyLightColorScheme(),
content = content,
)
}
@@ -51,7 +52,7 @@ private fun ivyLightColorScheme(): ColorScheme = ColorScheme(
scrim = IvyColors.ExtraDarkGray.copy(alpha = 0.8f)
)
-private fun ivyDarkColorScheme(): ColorScheme = ColorScheme(
+private fun ivyDarkColorScheme(isTrueBlack: Boolean): ColorScheme = ColorScheme(
primary = IvyColors.Purple.primary,
onPrimary = IvyColors.White,
primaryContainer = IvyColors.Purple.light,
@@ -71,15 +72,15 @@ private fun ivyDarkColorScheme(): ColorScheme = ColorScheme(
errorContainer = IvyColors.Red.light,
onErrorContainer = IvyColors.White,
- background = IvyColors.Black,
+ background = if (isTrueBlack) IvyColors.TrueBlack else IvyColors.Black,
onBackground = IvyColors.White,
- surface = IvyColors.Black,
+ surface = if (isTrueBlack) IvyColors.TrueBlack else IvyColors.Black,
onSurface = IvyColors.White,
surfaceVariant = IvyColors.ExtraDarkGray,
onSurfaceVariant = IvyColors.White,
surfaceTint = IvyColors.White,
inverseSurface = IvyColors.LightGray,
- inverseOnSurface = IvyColors.Black,
+ inverseOnSurface = if (isTrueBlack) IvyColors.TrueBlack else IvyColors.Black,
outline = IvyColors.Gray,
outlineVariant = IvyColors.LightGray,
diff --git a/shared/ui/core/src/main/java/com/ivy/design/system/colors/IvyColors.kt b/shared/ui/core/src/main/java/com/ivy/design/system/colors/IvyColors.kt
index 53ba0bccb3..dd42c01427 100644
--- a/shared/ui/core/src/main/java/com/ivy/design/system/colors/IvyColors.kt
+++ b/shared/ui/core/src/main/java/com/ivy/design/system/colors/IvyColors.kt
@@ -12,6 +12,7 @@ object IvyColors {
val DarkGray = Color(0xFF303033)
val ExtraDarkGray = Color(0xFF1C1C1F)
val Black = Color(0xFF09090A)
+ val TrueBlack = Color(0xFF000000)
val Red = ColorShades(
extraLight = Color(0xFFF5ABAB),
diff --git a/shared/ui/core/src/main/res/drawable/home_more_menu_amoled_dark_mode.xml b/shared/ui/core/src/main/res/drawable/home_more_menu_amoled_dark_mode.xml
new file mode 100644
index 0000000000..f71daa9e24
--- /dev/null
+++ b/shared/ui/core/src/main/res/drawable/home_more_menu_amoled_dark_mode.xml
@@ -0,0 +1,13 @@
+
+
+
diff --git a/shared/ui/core/src/main/res/values/strings.xml b/shared/ui/core/src/main/res/values/strings.xml
index 25af3e2adb..4b9184a7e1 100644
--- a/shared/ui/core/src/main/res/values/strings.xml
+++ b/shared/ui/core/src/main/res/values/strings.xml
@@ -103,6 +103,7 @@
Settings
Light mode
Dark mode
+ Amoled Dark mode
Auto mode
Planned\nPayments
Share Ivy
diff --git a/shared/ui/core/src/test/java/com/ivy/ui/PaparazziScreenshotTest.kt b/shared/ui/core/src/test/java/com/ivy/ui/PaparazziScreenshotTest.kt
index 38d20f2a22..a7455d21ab 100644
--- a/shared/ui/core/src/test/java/com/ivy/ui/PaparazziScreenshotTest.kt
+++ b/shared/ui/core/src/test/java/com/ivy/ui/PaparazziScreenshotTest.kt
@@ -20,7 +20,8 @@ open class PaparazziScreenshotTest {
dark = when (theme) {
PaparazziTheme.Light -> false
PaparazziTheme.Dark -> true
- }
+ },
+ isTrueBlack = false
) {
content()
}
diff --git a/shared/ui/navigation/src/main/java/com/ivy/navigation/IvyPreview.kt b/shared/ui/navigation/src/main/java/com/ivy/navigation/IvyPreview.kt
index d37648eb41..7be61ddb28 100644
--- a/shared/ui/navigation/src/main/java/com/ivy/navigation/IvyPreview.kt
+++ b/shared/ui/navigation/src/main/java/com/ivy/navigation/IvyPreview.kt
@@ -9,6 +9,6 @@ fun IvyPreview(
content: @Composable () -> Unit,
) {
NavigationRoot(navigation = Navigation()) {
- IvyMaterial3Theme(dark = dark, content = content)
+ IvyMaterial3Theme(dark = dark, isTrueBlack = false, content = content)
}
}
diff --git a/shared/ui/testing/src/main/java/com/ivy/ui/testing/PaparazziScreenshotTest.kt b/shared/ui/testing/src/main/java/com/ivy/ui/testing/PaparazziScreenshotTest.kt
index d89d843239..da9fa8a35d 100644
--- a/shared/ui/testing/src/main/java/com/ivy/ui/testing/PaparazziScreenshotTest.kt
+++ b/shared/ui/testing/src/main/java/com/ivy/ui/testing/PaparazziScreenshotTest.kt
@@ -28,7 +28,8 @@ open class PaparazziScreenshotTest {
dark = when (theme) {
PaparazziTheme.Light -> false
PaparazziTheme.Dark -> true
- }
+ },
+ isTrueBlack = false
) {
content()
}
diff --git a/temp/legacy-code/src/main/java/com/ivy/legacy/domain/action/settings/SettingsAct.kt b/temp/legacy-code/src/main/java/com/ivy/legacy/domain/action/settings/SettingsAct.kt
index 34770928ef..fa3484e7b1 100644
--- a/temp/legacy-code/src/main/java/com/ivy/legacy/domain/action/settings/SettingsAct.kt
+++ b/temp/legacy-code/src/main/java/com/ivy/legacy/domain/action/settings/SettingsAct.kt
@@ -19,7 +19,8 @@ class SettingsAct @Inject constructor(
val currentSettings = this(Unit)
val newTheme = when (currentSettings.theme) {
Theme.LIGHT -> Theme.DARK
- Theme.DARK -> Theme.AUTO
+ Theme.DARK -> Theme.AMOLED_DARK
+ Theme.AMOLED_DARK -> Theme.AUTO
Theme.AUTO -> Theme.LIGHT
}
return currentSettings.copy(theme = newTheme)
diff --git a/temp/old-design/src/main/java/com/ivy/design/api/systems/IvyWalletDesign.kt b/temp/old-design/src/main/java/com/ivy/design/api/systems/IvyWalletDesign.kt
index cb31a11801..43bc175a81 100644
--- a/temp/old-design/src/main/java/com/ivy/design/api/systems/IvyWalletDesign.kt
+++ b/temp/old-design/src/main/java/com/ivy/design/api/systems/IvyWalletDesign.kt
@@ -161,6 +161,29 @@ abstract class IvyWalletDesign : IvyDesign {
override val isLight = false
}
+ Theme.AMOLED_DARK -> object : IvyColors {
+ override val pure = TrueBlack
+ override val pureInverse = White
+ override val gray = Gray
+ override val medium = MediumBlack
+ override val mediumInverse = MediumWhite
+
+ override val primary = Purple
+ override val primary1 = IvyLight
+
+ override val green = Green
+ override val green1 = GreenDark
+
+ override val orange = Orange
+ override val orange1 = OrangeDark
+
+ override val red = Red
+ override val red1 = RedDark
+ override val red1Inverse = RedLight
+
+ override val isLight = false
+ }
+
Theme.AUTO -> if (isDarkModeEnabled) {
colors(Theme.DARK, true)
} else {
diff --git a/temp/old-design/src/main/java/com/ivy/design/l0_system/Colors.kt b/temp/old-design/src/main/java/com/ivy/design/l0_system/Colors.kt
index 40ff0d5db1..2b5a811f55 100644
--- a/temp/old-design/src/main/java/com/ivy/design/l0_system/Colors.kt
+++ b/temp/old-design/src/main/java/com/ivy/design/l0_system/Colors.kt
@@ -174,6 +174,9 @@ val Red2Dark = Color(0xFF802030)
val Red3Dark = Color(0xFF802653)
// --------------------------------------------------------------------------------------------------
+@Deprecated("Old design system. Use `:ivy-design` and Material3")
+val TrueBlack = Color(0xFF000000)
+
@Deprecated("Old design system. Use `:ivy-design` and Material3")
val MediumBlack = Color(0xFF2B2C2D)
diff --git a/temp/old-design/src/main/java/com/ivy/design/l0_system/IvyTheme.kt b/temp/old-design/src/main/java/com/ivy/design/l0_system/IvyTheme.kt
index 522d799dde..bd392652d5 100644
--- a/temp/old-design/src/main/java/com/ivy/design/l0_system/IvyTheme.kt
+++ b/temp/old-design/src/main/java/com/ivy/design/l0_system/IvyTheme.kt
@@ -70,6 +70,7 @@ fun IvyTheme(
IvyMaterial3Theme(
dark = !colors.isLight,
+ isTrueBlack = theme == Theme.AMOLED_DARK,
content = content,
)
}