Add Nord Theme (#10308)
* Add Nord Theme * update * update error color * update comment
This commit is contained in:
parent
6510a9617a
commit
bce6af62fc
8 changed files with 171 additions and 0 deletions
|
@ -9,6 +9,7 @@ enum class AppTheme(val titleRes: StringResource?) {
|
||||||
GREEN_APPLE(MR.strings.theme_greenapple),
|
GREEN_APPLE(MR.strings.theme_greenapple),
|
||||||
LAVENDER(MR.strings.theme_lavender),
|
LAVENDER(MR.strings.theme_lavender),
|
||||||
MIDNIGHT_DUSK(MR.strings.theme_midnightdusk),
|
MIDNIGHT_DUSK(MR.strings.theme_midnightdusk),
|
||||||
|
NORD(MR.strings.theme_nord),
|
||||||
STRAWBERRY_DAIQUIRI(MR.strings.theme_strawberrydaiquiri),
|
STRAWBERRY_DAIQUIRI(MR.strings.theme_strawberrydaiquiri),
|
||||||
TAKO(MR.strings.theme_tako),
|
TAKO(MR.strings.theme_tako),
|
||||||
TEALTURQUOISE(MR.strings.theme_tealturquoise),
|
TEALTURQUOISE(MR.strings.theme_tealturquoise),
|
||||||
|
|
|
@ -12,6 +12,7 @@ import eu.kanade.presentation.theme.colorscheme.GreenAppleColorScheme
|
||||||
import eu.kanade.presentation.theme.colorscheme.LavenderColorScheme
|
import eu.kanade.presentation.theme.colorscheme.LavenderColorScheme
|
||||||
import eu.kanade.presentation.theme.colorscheme.MidnightDuskColorScheme
|
import eu.kanade.presentation.theme.colorscheme.MidnightDuskColorScheme
|
||||||
import eu.kanade.presentation.theme.colorscheme.MonetColorScheme
|
import eu.kanade.presentation.theme.colorscheme.MonetColorScheme
|
||||||
|
import eu.kanade.presentation.theme.colorscheme.NordColorScheme
|
||||||
import eu.kanade.presentation.theme.colorscheme.StrawberryColorScheme
|
import eu.kanade.presentation.theme.colorscheme.StrawberryColorScheme
|
||||||
import eu.kanade.presentation.theme.colorscheme.TachiyomiColorScheme
|
import eu.kanade.presentation.theme.colorscheme.TachiyomiColorScheme
|
||||||
import eu.kanade.presentation.theme.colorscheme.TakoColorScheme
|
import eu.kanade.presentation.theme.colorscheme.TakoColorScheme
|
||||||
|
@ -47,6 +48,7 @@ private fun getThemeColorScheme(
|
||||||
AppTheme.GREEN_APPLE -> GreenAppleColorScheme
|
AppTheme.GREEN_APPLE -> GreenAppleColorScheme
|
||||||
AppTheme.LAVENDER -> LavenderColorScheme
|
AppTheme.LAVENDER -> LavenderColorScheme
|
||||||
AppTheme.MIDNIGHT_DUSK -> MidnightDuskColorScheme
|
AppTheme.MIDNIGHT_DUSK -> MidnightDuskColorScheme
|
||||||
|
AppTheme.NORD -> NordColorScheme
|
||||||
AppTheme.STRAWBERRY_DAIQUIRI -> StrawberryColorScheme
|
AppTheme.STRAWBERRY_DAIQUIRI -> StrawberryColorScheme
|
||||||
AppTheme.TAKO -> TakoColorScheme
|
AppTheme.TAKO -> TakoColorScheme
|
||||||
AppTheme.TEALTURQUOISE -> TealTurqoiseColorScheme
|
AppTheme.TEALTURQUOISE -> TealTurqoiseColorScheme
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
package eu.kanade.presentation.theme.colorscheme
|
||||||
|
|
||||||
|
import androidx.compose.material3.darkColorScheme
|
||||||
|
import androidx.compose.material3.lightColorScheme
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Colors for Nord theme
|
||||||
|
* https://www.nordtheme.com/docs/colors-and-palettes
|
||||||
|
* for the light theme, the primary color is switched with the tertiary for better contrast in some case
|
||||||
|
*/
|
||||||
|
internal object NordColorScheme : BaseColorScheme() {
|
||||||
|
|
||||||
|
override val darkScheme = darkColorScheme(
|
||||||
|
primary = Color(0xFF88C0D0),
|
||||||
|
onPrimary = Color(0xFF2E3440),
|
||||||
|
primaryContainer = Color(0xFF88C0D0),
|
||||||
|
onPrimaryContainer = Color(0xFF2E3440),
|
||||||
|
inversePrimary = Color(0xFF397E91),
|
||||||
|
secondary = Color(0xFF81A1C1),
|
||||||
|
onSecondary = Color(0xFF2E3440),
|
||||||
|
secondaryContainer = Color(0xFF81A1C1),
|
||||||
|
onSecondaryContainer = Color(0xFF2E3440),
|
||||||
|
tertiary = Color(0xFF5E81AC),
|
||||||
|
onTertiary = Color(0xFF000000),
|
||||||
|
tertiaryContainer = Color(0xFF5E81AC),
|
||||||
|
onTertiaryContainer = Color(0xFF000000),
|
||||||
|
background = Color(0xFF2E3440),
|
||||||
|
onBackground = Color(0xFFECEFF4),
|
||||||
|
surface = Color(0xFF3B4252),
|
||||||
|
onSurface = Color(0xFFECEFF4),
|
||||||
|
surfaceVariant = Color(0xFF2E3440),
|
||||||
|
onSurfaceVariant = Color(0xFFECEFF4),
|
||||||
|
surfaceTint = Color(0xFF88C0D0),
|
||||||
|
inverseSurface = Color(0xFFD8DEE9),
|
||||||
|
inverseOnSurface = Color(0xFF2E3440),
|
||||||
|
outline = Color(0xFF6d717b),
|
||||||
|
outlineVariant = Color(0xFF90939a),
|
||||||
|
onError = Color(0xFF2E3440),
|
||||||
|
errorContainer = Color(0xFFBF616A),
|
||||||
|
onErrorContainer = Color(0xFF000000),
|
||||||
|
)
|
||||||
|
|
||||||
|
override val lightScheme = lightColorScheme(
|
||||||
|
primary = Color(0xFF5E81AC),
|
||||||
|
onPrimary = Color(0xFF000000),
|
||||||
|
primaryContainer = Color(0xFF5E81AC),
|
||||||
|
onPrimaryContainer = Color(0xFF000000),
|
||||||
|
inversePrimary = Color(0xFF8CA8CD),
|
||||||
|
secondary = Color(0xFF81A1C1),
|
||||||
|
onSecondary = Color(0xFF2E3440),
|
||||||
|
secondaryContainer = Color(0xFF81A1C1),
|
||||||
|
onSecondaryContainer = Color(0xFF2E3440),
|
||||||
|
tertiary = Color(0xFF88C0D0),
|
||||||
|
onTertiary = Color(0xFF2E3440),
|
||||||
|
tertiaryContainer = Color(0xFF88C0D0),
|
||||||
|
onTertiaryContainer = Color(0xFF2E3440),
|
||||||
|
background = Color(0xFFECEFF4),
|
||||||
|
onBackground = Color(0xFF2E3440),
|
||||||
|
surface = Color(0xFFE5E9F0),
|
||||||
|
onSurface = Color(0xFF2E3440),
|
||||||
|
surfaceVariant = Color(0xFFffffff),
|
||||||
|
onSurfaceVariant = Color(0xFF2E3440),
|
||||||
|
surfaceTint = Color(0xFF5E81AC),
|
||||||
|
inverseSurface = Color(0xFF3B4252),
|
||||||
|
inverseOnSurface = Color(0xFFECEFF4),
|
||||||
|
outline = Color(0xFF2E3440),
|
||||||
|
onError = Color(0xFFECEFF4),
|
||||||
|
errorContainer = Color(0xFFBF616A),
|
||||||
|
onErrorContainer = Color(0xFF000000),
|
||||||
|
)
|
||||||
|
}
|
|
@ -26,6 +26,9 @@ interface ThemingDelegate {
|
||||||
AppTheme.MIDNIGHT_DUSK -> {
|
AppTheme.MIDNIGHT_DUSK -> {
|
||||||
resIds += R.style.Theme_Tachiyomi_MidnightDusk
|
resIds += R.style.Theme_Tachiyomi_MidnightDusk
|
||||||
}
|
}
|
||||||
|
AppTheme.NORD -> {
|
||||||
|
resIds += R.style.Theme_Tachiyomi_Nord
|
||||||
|
}
|
||||||
AppTheme.STRAWBERRY_DAIQUIRI -> {
|
AppTheme.STRAWBERRY_DAIQUIRI -> {
|
||||||
resIds += R.style.Theme_Tachiyomi_StrawberryDaiquiri
|
resIds += R.style.Theme_Tachiyomi_StrawberryDaiquiri
|
||||||
}
|
}
|
||||||
|
|
|
@ -333,6 +333,37 @@
|
||||||
<item name="colorPrimaryInverse">@color/tidalwave_primaryInverse</item>
|
<item name="colorPrimaryInverse">@color/tidalwave_primaryInverse</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<!--== Nord Theme ==-->
|
||||||
|
<style name="Theme.Tachiyomi.Nord">
|
||||||
|
<!-- Theme Colors -->
|
||||||
|
<item name="colorPrimary">@color/nord_primary</item>
|
||||||
|
<item name="colorOnPrimary">@color/nord_onPrimary</item>
|
||||||
|
<item name="colorPrimaryContainer">@color/nord_primaryContainer</item>
|
||||||
|
<item name="colorOnPrimaryContainer">@color/nord_onPrimaryContainer</item>
|
||||||
|
<item name="colorSecondary">@color/nord_secondary</item>
|
||||||
|
<item name="colorOnSecondary">@color/nord_onSecondary</item>
|
||||||
|
<item name="colorSecondaryContainer">@color/nord_secondaryContainer</item>
|
||||||
|
<item name="colorOnSecondaryContainer">@color/nord_onSecondaryContainer</item>
|
||||||
|
<item name="colorTertiary">@color/nord_tertiary</item>
|
||||||
|
<item name="colorOnTertiary">@color/nord_onTertiary</item>
|
||||||
|
<item name="colorTertiaryContainer">@color/nord_tertiaryContainer</item>
|
||||||
|
<item name="colorOnTertiaryContainer">@color/nord_onTertiaryContainer</item>
|
||||||
|
<item name="android:colorBackground">@color/nord_background</item>
|
||||||
|
<item name="colorOnBackground">@color/nord_onBackground</item>
|
||||||
|
<item name="colorSurface">@color/nord_surface</item>
|
||||||
|
<item name="colorOnSurface">@color/nord_onSurface</item>
|
||||||
|
<item name="colorSurfaceVariant">@color/nord_surfaceVariant</item>
|
||||||
|
<item name="colorOnSurfaceVariant">@color/nord_onSurfaceVariant</item>
|
||||||
|
<item name="colorOutline">@color/nord_outline</item>
|
||||||
|
<item name="colorOnSurfaceInverse">@color/nord_inverseOnSurface</item>
|
||||||
|
<item name="colorSurfaceInverse">@color/nord_inverseSurface</item>
|
||||||
|
<item name="colorPrimaryInverse">@color/nord_primaryInverse</item>
|
||||||
|
<item name="colorOnError">@color/nord_onError</item>
|
||||||
|
<item name="colorErrorContainer">@color/nord_errorContainer</item>
|
||||||
|
<item name="colorOnErrorContainer">@color/nord_onErrorContainer</item>
|
||||||
|
<item name="elevationOverlayColor">@color/nord_elevationOverlay</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<!--== AMOLED Mode Overlay ==-->
|
<!--== AMOLED Mode Overlay ==-->
|
||||||
<style name="ThemeOverlay.Tachiyomi.Amoled" parent="" />
|
<style name="ThemeOverlay.Tachiyomi.Amoled" parent="" />
|
||||||
|
|
||||||
|
|
|
@ -225,6 +225,7 @@
|
||||||
<string name="theme_greenapple">Green Apple</string>
|
<string name="theme_greenapple">Green Apple</string>
|
||||||
<string name="theme_lavender">Lavender</string>
|
<string name="theme_lavender">Lavender</string>
|
||||||
<string name="theme_midnightdusk">Midnight Dusk</string>
|
<string name="theme_midnightdusk">Midnight Dusk</string>
|
||||||
|
<string name="theme_nord">Nord</string>
|
||||||
<string name="theme_strawberrydaiquiri">Strawberry Daiquiri</string>
|
<string name="theme_strawberrydaiquiri">Strawberry Daiquiri</string>
|
||||||
<string name="theme_tako">Tako</string>
|
<string name="theme_tako">Tako</string>
|
||||||
<string name="theme_tealturquoise">Teal & Turquoise</string>
|
<string name="theme_tealturquoise">Teal & Turquoise</string>
|
||||||
|
|
30
presentation-core/src/main/res/values-night/colors_nord.xml
Normal file
30
presentation-core/src/main/res/values-night/colors_nord.xml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--https://www.nordtheme.com/docs/colors-and-palettes-->
|
||||||
|
<resources>
|
||||||
|
<color name="nord_primary">#88C0D0</color>
|
||||||
|
<color name="nord_onPrimary">#2E3440</color>
|
||||||
|
<color name="nord_primaryContainer">#88C0D0</color>
|
||||||
|
<color name="nord_onPrimaryContainer">#2E3440</color>
|
||||||
|
<color name="nord_secondary">#81A1C1</color>
|
||||||
|
<color name="nord_onSecondary">#2E3440</color>
|
||||||
|
<color name="nord_secondaryContainer">#81A1C1</color>
|
||||||
|
<color name="nord_onSecondaryContainer">#2E3440</color>
|
||||||
|
<color name="nord_tertiary">#5E81AC</color>
|
||||||
|
<color name="nord_onTertiary">#000000</color>
|
||||||
|
<color name="nord_tertiaryContainer">#5E81AC</color>
|
||||||
|
<color name="nord_onTertiaryContainer">#000000</color>
|
||||||
|
<color name="nord_background">#2E3440</color>
|
||||||
|
<color name="nord_onBackground">#ECEFF4</color>
|
||||||
|
<color name="nord_surface">#3B4252</color>
|
||||||
|
<color name="nord_onSurface">#ECEFF4</color>
|
||||||
|
<color name="nord_surfaceVariant">#2E3440</color>
|
||||||
|
<color name="nord_onSurfaceVariant">#ECEFF4</color>
|
||||||
|
<color name="nord_outline">#D8DEE9</color>
|
||||||
|
<color name="nord_inverseOnSurface">#2E3440</color>
|
||||||
|
<color name="nord_inverseSurface">#D8DEE9</color>
|
||||||
|
<color name="nord_primaryInverse">#397E91</color>
|
||||||
|
<color name="nord_elevationOverlay">#434C5E</color>
|
||||||
|
<color name="nord_onError">#2E3440</color>
|
||||||
|
<color name="nord_errorContainer">#BF616A</color>
|
||||||
|
<color name="nord_onErrorContainer">#000000</color>
|
||||||
|
</resources>
|
31
presentation-core/src/main/res/values/colors_nord.xml
Normal file
31
presentation-core/src/main/res/values/colors_nord.xml
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--https://www.nordtheme.com/docs/colors-and-palettes-->
|
||||||
|
<!--for the light theme, the primary color is switched with the tertiary for better contrast in some case-->
|
||||||
|
<resources>
|
||||||
|
<color name="nord_primary">#5E81AC</color>
|
||||||
|
<color name="nord_onPrimary">#000000</color>
|
||||||
|
<color name="nord_primaryContainer">#5E81AC</color>
|
||||||
|
<color name="nord_onPrimaryContainer">#000000</color>
|
||||||
|
<color name="nord_secondary">#81A1C1</color>
|
||||||
|
<color name="nord_onSecondary">#2E3440</color>
|
||||||
|
<color name="nord_secondaryContainer">#81A1C1</color>
|
||||||
|
<color name="nord_onSecondaryContainer">#2E3440</color>
|
||||||
|
<color name="nord_tertiary">#88C0D0</color>
|
||||||
|
<color name="nord_onTertiary">#2E3440</color>
|
||||||
|
<color name="nord_tertiaryContainer">#88C0D0</color>
|
||||||
|
<color name="nord_onTertiaryContainer">#2E3440</color>
|
||||||
|
<color name="nord_background">#ECEFF4</color>
|
||||||
|
<color name="nord_onBackground">#2E3440</color>
|
||||||
|
<color name="nord_surface">#E5E9F0</color>
|
||||||
|
<color name="nord_onSurface">#2E3440</color>
|
||||||
|
<color name="nord_surfaceVariant">#ffffff</color>
|
||||||
|
<color name="nord_onSurfaceVariant">#2E3440</color>
|
||||||
|
<color name="nord_outline">#4C566A</color>
|
||||||
|
<color name="nord_inverseOnSurface">#ECEFF4</color>
|
||||||
|
<color name="nord_inverseSurface">#3B4252</color>
|
||||||
|
<color name="nord_primaryInverse">#8CA8CD</color>
|
||||||
|
<color name="nord_elevationOverlay">#D8DEE9</color>
|
||||||
|
<color name="nord_onError">#ECEFF4</color>
|
||||||
|
<color name="nord_errorContainer">#BF616A</color>
|
||||||
|
<color name="nord_onErrorContainer">#000000</color>
|
||||||
|
</resources>
|
Reference in a new issue