mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Add extra themes
This commit is contained in:
parent
a1e6d414f2
commit
b60d2a9768
@ -15,6 +15,17 @@
|
||||
<string name="classic_material_light_theme_name">AOSP Material Light</string>
|
||||
<string name="voice_input_theme_name">FUTO VI Theme</string>
|
||||
|
||||
|
||||
<string name="deep_sea_light_theme_name">Deep Sea Light</string>
|
||||
<string name="deep_sea_dark_theme_name">Deep Sea Dark</string>
|
||||
|
||||
<string name="emerald_theme_name">Emerald</string>
|
||||
|
||||
<string name="snowfall_theme_name">Snowfall</string>
|
||||
<string name="steel_gray_theme_name">Steel Gray</string>
|
||||
<string name="sunflower_theme_name">Sunflower</string>
|
||||
<string name="cotton_candy_theme_name">Cotton Candy</string>
|
||||
|
||||
<string name="dynamic_system_theme_name">Dynamic Auto</string>
|
||||
<string name="dynamic_light_theme_name">Dynamic Light</string>
|
||||
<string name="dynamic_dark_theme_name">Dynamic Dark</string>
|
||||
|
@ -6,9 +6,16 @@ import androidx.compose.material3.ColorScheme
|
||||
import org.futo.inputmethod.latin.uix.theme.presets.AMOLEDDarkPurple
|
||||
import org.futo.inputmethod.latin.uix.theme.presets.ClassicMaterialDark
|
||||
import org.futo.inputmethod.latin.uix.theme.presets.ClassicMaterialLight
|
||||
import org.futo.inputmethod.latin.uix.theme.presets.CottonCandy
|
||||
import org.futo.inputmethod.latin.uix.theme.presets.DeepSeaDark
|
||||
import org.futo.inputmethod.latin.uix.theme.presets.DeepSeaLight
|
||||
import org.futo.inputmethod.latin.uix.theme.presets.DynamicDarkTheme
|
||||
import org.futo.inputmethod.latin.uix.theme.presets.DynamicLightTheme
|
||||
import org.futo.inputmethod.latin.uix.theme.presets.DynamicSystemTheme
|
||||
import org.futo.inputmethod.latin.uix.theme.presets.Emerald
|
||||
import org.futo.inputmethod.latin.uix.theme.presets.Snowfall
|
||||
import org.futo.inputmethod.latin.uix.theme.presets.SteelGray
|
||||
import org.futo.inputmethod.latin.uix.theme.presets.Sunflower
|
||||
import org.futo.inputmethod.latin.uix.theme.presets.VoiceInputTheme
|
||||
|
||||
data class ThemeOption(
|
||||
@ -19,24 +26,26 @@ data class ThemeOption(
|
||||
val obtainColors: (Context) -> ColorScheme,
|
||||
)
|
||||
|
||||
val ThemeOptions = hashMapOf(
|
||||
val ThemeOptions = mapOf(
|
||||
VoiceInputTheme.key to VoiceInputTheme,
|
||||
|
||||
DynamicSystemTheme.key to DynamicSystemTheme,
|
||||
DynamicDarkTheme.key to DynamicDarkTheme,
|
||||
DynamicLightTheme.key to DynamicLightTheme,
|
||||
|
||||
ClassicMaterialDark.key to ClassicMaterialDark,
|
||||
ClassicMaterialLight.key to ClassicMaterialLight,
|
||||
VoiceInputTheme.key to VoiceInputTheme,
|
||||
AMOLEDDarkPurple.key to AMOLEDDarkPurple,
|
||||
|
||||
Sunflower.key to Sunflower,
|
||||
Snowfall.key to Snowfall,
|
||||
SteelGray.key to SteelGray,
|
||||
Emerald.key to Emerald,
|
||||
CottonCandy.key to CottonCandy,
|
||||
|
||||
DeepSeaLight.key to DeepSeaLight,
|
||||
DeepSeaDark.key to DeepSeaDark,
|
||||
|
||||
)
|
||||
|
||||
val ThemeOptionKeys = arrayOf(
|
||||
VoiceInputTheme.key,
|
||||
DynamicDarkTheme.key,
|
||||
DynamicLightTheme.key,
|
||||
DynamicSystemTheme.key,
|
||||
|
||||
ClassicMaterialDark.key,
|
||||
ClassicMaterialLight.key,
|
||||
AMOLEDDarkPurple.key,
|
||||
)
|
||||
val ThemeOptionKeys = ThemeOptions.keys
|
@ -0,0 +1,104 @@
|
||||
package org.futo.inputmethod.latin.uix.theme.presets
|
||||
|
||||
import androidx.compose.material3.lightColorScheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import org.futo.inputmethod.latin.R
|
||||
import org.futo.inputmethod.latin.uix.theme.ThemeOption
|
||||
import org.futo.inputmethod.latin.uix.theme.selector.ThemePreview
|
||||
|
||||
private val primaryLight = Color(0xFFEC5EB4)
|
||||
private val onPrimaryLight = Color(0xFFFFFFFF)
|
||||
private val primaryContainerLight = Color(0xFFFFA5F5)
|
||||
private val onPrimaryContainerLight = Color(0xFF610062)
|
||||
private val secondaryLight = Color(0xFF7A5175)
|
||||
private val onSecondaryLight = Color(0xFFFFFFFF)
|
||||
private val secondaryContainerLight = Color(0xFFFFD1F6)
|
||||
private val onSecondaryContainerLight = Color(0xFF5F395B)
|
||||
private val tertiaryLight = Color(0xFF904D1B)
|
||||
private val onTertiaryLight = Color(0xFFFFFFFF)
|
||||
private val tertiaryContainerLight = Color(0xFFFFB383)
|
||||
private val onTertiaryContainerLight = Color(0xFF582700)
|
||||
private val errorLight = Color(0xFFBA1A1A)
|
||||
private val onErrorLight = Color(0xFFFFFFFF)
|
||||
private val errorContainerLight = Color(0xFFFFDAD6)
|
||||
private val onErrorContainerLight = Color(0xFF410002)
|
||||
private val backgroundLight = Color(0xFFFFECF9)
|
||||
private val onBackgroundLight = Color(0xFF21191F)
|
||||
private val surfaceLight = Color(0xFFFFECF9)
|
||||
private val onSurfaceLight = Color(0xFF21191F)
|
||||
private val surfaceVariantLight = Color(0xFFF2DDEB)
|
||||
private val onSurfaceVariantLight = Color(0xFF51434E)
|
||||
private val outlineLight = Color(0xFF83727E)
|
||||
private val outlineVariantLight = Color(0xFFD5C1CE)
|
||||
private val scrimLight = Color(0xFF000000)
|
||||
private val inverseSurfaceLight = Color(0xFF362E34)
|
||||
private val inverseOnSurfaceLight = Color(0xFFFCEDF5)
|
||||
private val inversePrimaryLight = Color(0xFFFFAAF5)
|
||||
private val surfaceDimLight = Color(0xFFE4D6DE)
|
||||
private val surfaceBrightLight = Color(0xFFFFF7F9)
|
||||
private val surfaceContainerLowestLight = Color(0xFFFFFFFF)
|
||||
private val surfaceContainerLowLight = Color(0xFFFFF0F8)
|
||||
private val surfaceContainerLight = Color(0xFFF9EAF2)
|
||||
private val surfaceContainerHighLight = Color(0xFFF3E4ED)
|
||||
private val surfaceContainerHighestLight = Color(0xFFEDDFE7)
|
||||
|
||||
|
||||
private val lightScheme = lightColorScheme(
|
||||
primary = primaryLight,
|
||||
onPrimary = onPrimaryLight,
|
||||
primaryContainer = primaryContainerLight,
|
||||
onPrimaryContainer = onPrimaryContainerLight,
|
||||
secondary = secondaryLight,
|
||||
onSecondary = onSecondaryLight,
|
||||
secondaryContainer = secondaryContainerLight,
|
||||
onSecondaryContainer = onSecondaryContainerLight,
|
||||
tertiary = tertiaryLight,
|
||||
onTertiary = onTertiaryLight,
|
||||
tertiaryContainer = tertiaryContainerLight,
|
||||
onTertiaryContainer = onTertiaryContainerLight,
|
||||
error = errorLight,
|
||||
onError = onErrorLight,
|
||||
errorContainer = errorContainerLight,
|
||||
onErrorContainer = onErrorContainerLight,
|
||||
background = backgroundLight,
|
||||
onBackground = onBackgroundLight,
|
||||
surface = surfaceLight,
|
||||
onSurface = onSurfaceLight,
|
||||
surfaceVariant = surfaceVariantLight,
|
||||
onSurfaceVariant = onSurfaceVariantLight,
|
||||
outline = outlineLight,
|
||||
outlineVariant = outlineVariantLight,
|
||||
scrim = scrimLight,
|
||||
inverseSurface = inverseSurfaceLight,
|
||||
inverseOnSurface = inverseOnSurfaceLight,
|
||||
inversePrimary = inversePrimaryLight,
|
||||
surfaceDim = surfaceDimLight,
|
||||
surfaceBright = surfaceBrightLight,
|
||||
surfaceContainerLowest = surfaceContainerLowestLight,
|
||||
surfaceContainerLow = surfaceContainerLowLight,
|
||||
surfaceContainer = surfaceContainerLight,
|
||||
surfaceContainerHigh = surfaceContainerHighLight,
|
||||
surfaceContainerHighest = surfaceContainerHighestLight,
|
||||
)
|
||||
|
||||
|
||||
val CottonCandy = ThemeOption(
|
||||
dynamic = false,
|
||||
key = "CottonCandy",
|
||||
name = R.string.cotton_candy_theme_name,
|
||||
available = { true }
|
||||
) {
|
||||
lightScheme
|
||||
}
|
||||
|
||||
@Composable
|
||||
@Preview
|
||||
private fun PreviewThemeLight() {
|
||||
ThemePreview(CottonCandy)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
189
java/src/org/futo/inputmethod/latin/uix/theme/presets/DeepSea.kt
Normal file
189
java/src/org/futo/inputmethod/latin/uix/theme/presets/DeepSea.kt
Normal file
@ -0,0 +1,189 @@
|
||||
package org.futo.inputmethod.latin.uix.theme.presets
|
||||
|
||||
import androidx.compose.material3.darkColorScheme
|
||||
import androidx.compose.material3.lightColorScheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import org.futo.inputmethod.latin.R
|
||||
import org.futo.inputmethod.latin.uix.theme.ThemeOption
|
||||
import org.futo.inputmethod.latin.uix.theme.selector.ThemePreview
|
||||
|
||||
|
||||
private val primaryLight = Color(0xFF4062D3)
|
||||
private val onPrimaryLight = Color(0xFFFFFFFF)
|
||||
private val primaryContainerLight = Color(0xFF3847FF)
|
||||
private val onPrimaryContainerLight = Color(0xFFFFFFFF)
|
||||
private val secondaryLight = Color(0xFF476083)
|
||||
private val onSecondaryLight = Color(0xFFFFFFFF)
|
||||
private val secondaryContainerLight = Color(0xFF869FC5)
|
||||
private val onSecondaryContainerLight = Color(0xFF001025)
|
||||
private val tertiaryLight = Color(0xFF006494)
|
||||
private val onTertiaryLight = Color(0xFFFFFFFF)
|
||||
private val tertiaryContainerLight = Color(0xFF5CA4D8)
|
||||
private val onTertiaryContainerLight = Color(0xFF00111D)
|
||||
private val errorLight = Color(0xFFBA1A1A)
|
||||
private val onErrorLight = Color(0xFFFFFFFF)
|
||||
private val errorContainerLight = Color(0xFFFFDAD6)
|
||||
private val onErrorContainerLight = Color(0xFF410002)
|
||||
private val backgroundLight = Color(0xFFDBE8FF)
|
||||
private val onBackgroundLight = Color(0xFF1A1B26)
|
||||
private val surfaceLight = Color(0xFFDBE8FF)
|
||||
private val onSurfaceLight = Color(0xFF1B1B22)
|
||||
private val surfaceVariantLight = Color(0xFFE1E0F7)
|
||||
private val onSurfaceVariantLight = Color(0xFF444557)
|
||||
private val outlineLight = Color(0xFF757589)
|
||||
private val outlineVariantLight = Color(0xFFC5C5DA)
|
||||
private val scrimLight = Color(0xFF000000)
|
||||
private val inverseSurfaceLight = Color(0xFF303038)
|
||||
private val inverseOnSurfaceLight = Color(0xFFF2EFFA)
|
||||
private val inversePrimaryLight = Color(0xFFBEC2FF)
|
||||
private val surfaceDimLight = Color(0xFFDBD9E3)
|
||||
private val surfaceBrightLight = Color(0xFFFBF8FF)
|
||||
private val surfaceContainerLowestLight = Color(0xFFFFFFFF)
|
||||
private val surfaceContainerLowLight = Color(0xFFF5F2FD)
|
||||
private val surfaceContainerLight = Color(0xFFEFECF7)
|
||||
private val surfaceContainerHighLight = Color(0xFFE9E7F1)
|
||||
private val surfaceContainerHighestLight = Color(0xFFE3E1EC)
|
||||
|
||||
private val primaryDark = Color(0xFFBEC2FF)
|
||||
private val onPrimaryDark = Color(0xFF000CA5)
|
||||
private val primaryContainerDark = Color(0xFF0016F5)
|
||||
private val onPrimaryContainerDark = Color(0xFFE7E7FF)
|
||||
private val secondaryDark = Color(0xFFAFC8F1)
|
||||
private val onSecondaryDark = Color(0xFF163152)
|
||||
private val secondaryContainerDark = Color(0xFF5D769A)
|
||||
private val onSecondaryContainerDark = Color(0xFFFFFFFF)
|
||||
private val tertiaryDark = Color(0xFF8ECDFF)
|
||||
private val onTertiaryDark = Color(0xFF00344F)
|
||||
private val tertiaryContainerDark = Color(0xFF2C7BAC)
|
||||
private val onTertiaryContainerDark = Color(0xFFFFFFFF)
|
||||
private val errorDark = Color(0xFFFFB4AB)
|
||||
private val onErrorDark = Color(0xFF690005)
|
||||
private val errorContainerDark = Color(0xFF93000A)
|
||||
private val onErrorContainerDark = Color(0xFFFFDAD6)
|
||||
private val backgroundDark = Color(0xFF12132D)
|
||||
private val onBackgroundDark = Color(0xFFE3E1F0)
|
||||
private val surfaceDark = Color(0xFF12132A)
|
||||
private val onSurfaceDark = Color(0xFFE3E1EC)
|
||||
private val surfaceVariantDark = Color(0xFF444557)
|
||||
private val onSurfaceVariantDark = Color(0xFFC5C5DA)
|
||||
private val outlineDark = Color(0xFF8F8FA3)
|
||||
private val outlineVariantDark = Color(0xFF444557)
|
||||
private val scrimDark = Color(0xFF000000)
|
||||
private val inverseSurfaceDark = Color(0xFFE3E1EC)
|
||||
private val inverseOnSurfaceDark = Color(0xFF303038)
|
||||
private val inversePrimaryDark = Color(0xFF2F3EFF)
|
||||
private val surfaceDimDark = Color(0xFF12131A)
|
||||
private val surfaceBrightDark = Color(0xFF383841)
|
||||
private val surfaceContainerLowestDark = Color(0xFF0D0E15)
|
||||
private val surfaceContainerLowDark = Color(0xFF1B1B22)
|
||||
private val surfaceContainerDark = Color(0xFF1F1F26)
|
||||
private val surfaceContainerHighDark = Color(0xFF292931)
|
||||
private val surfaceContainerHighestDark = Color(0xFF34343C)
|
||||
|
||||
private val lightScheme = lightColorScheme(
|
||||
primary = primaryLight,
|
||||
onPrimary = onPrimaryLight,
|
||||
primaryContainer = primaryContainerLight,
|
||||
onPrimaryContainer = onPrimaryContainerLight,
|
||||
secondary = secondaryLight,
|
||||
onSecondary = onSecondaryLight,
|
||||
secondaryContainer = secondaryContainerLight,
|
||||
onSecondaryContainer = onSecondaryContainerLight,
|
||||
tertiary = tertiaryLight,
|
||||
onTertiary = onTertiaryLight,
|
||||
tertiaryContainer = tertiaryContainerLight,
|
||||
onTertiaryContainer = onTertiaryContainerLight,
|
||||
error = errorLight,
|
||||
onError = onErrorLight,
|
||||
errorContainer = errorContainerLight,
|
||||
onErrorContainer = onErrorContainerLight,
|
||||
background = backgroundLight,
|
||||
onBackground = onBackgroundLight,
|
||||
surface = surfaceLight,
|
||||
onSurface = onSurfaceLight,
|
||||
surfaceVariant = surfaceVariantLight,
|
||||
onSurfaceVariant = onSurfaceVariantLight,
|
||||
outline = outlineLight,
|
||||
outlineVariant = outlineVariantLight,
|
||||
scrim = scrimLight,
|
||||
inverseSurface = inverseSurfaceLight,
|
||||
inverseOnSurface = inverseOnSurfaceLight,
|
||||
inversePrimary = inversePrimaryLight,
|
||||
surfaceDim = surfaceDimLight,
|
||||
surfaceBright = surfaceBrightLight,
|
||||
surfaceContainerLowest = surfaceContainerLowestLight,
|
||||
surfaceContainerLow = surfaceContainerLowLight,
|
||||
surfaceContainer = surfaceContainerLight,
|
||||
surfaceContainerHigh = surfaceContainerHighLight,
|
||||
surfaceContainerHighest = surfaceContainerHighestLight,
|
||||
)
|
||||
|
||||
private val darkScheme = darkColorScheme(
|
||||
primary = primaryDark,
|
||||
onPrimary = onPrimaryDark,
|
||||
primaryContainer = primaryContainerDark,
|
||||
onPrimaryContainer = onPrimaryContainerDark,
|
||||
secondary = secondaryDark,
|
||||
onSecondary = onSecondaryDark,
|
||||
secondaryContainer = secondaryContainerDark,
|
||||
onSecondaryContainer = onSecondaryContainerDark,
|
||||
tertiary = tertiaryDark,
|
||||
onTertiary = onTertiaryDark,
|
||||
tertiaryContainer = tertiaryContainerDark,
|
||||
onTertiaryContainer = onTertiaryContainerDark,
|
||||
error = errorDark,
|
||||
onError = onErrorDark,
|
||||
errorContainer = errorContainerDark,
|
||||
onErrorContainer = onErrorContainerDark,
|
||||
background = backgroundDark,
|
||||
onBackground = onBackgroundDark,
|
||||
surface = surfaceDark,
|
||||
onSurface = onSurfaceDark,
|
||||
surfaceVariant = surfaceVariantDark,
|
||||
onSurfaceVariant = onSurfaceVariantDark,
|
||||
outline = outlineDark,
|
||||
outlineVariant = outlineVariantDark,
|
||||
scrim = scrimDark,
|
||||
inverseSurface = inverseSurfaceDark,
|
||||
inverseOnSurface = inverseOnSurfaceDark,
|
||||
inversePrimary = inversePrimaryDark,
|
||||
surfaceDim = surfaceDimDark,
|
||||
surfaceBright = surfaceBrightDark,
|
||||
surfaceContainerLowest = surfaceContainerLowestDark,
|
||||
surfaceContainerLow = surfaceContainerLowDark,
|
||||
surfaceContainer = surfaceContainerDark,
|
||||
surfaceContainerHigh = surfaceContainerHighDark,
|
||||
surfaceContainerHighest = surfaceContainerHighestDark,
|
||||
)
|
||||
|
||||
val DeepSeaLight = ThemeOption(
|
||||
dynamic = false,
|
||||
key = "DeepSeaLight",
|
||||
name = R.string.deep_sea_light_theme_name,
|
||||
available = { true }
|
||||
) {
|
||||
lightScheme
|
||||
}
|
||||
|
||||
val DeepSeaDark = ThemeOption(
|
||||
dynamic = false,
|
||||
key = "DeepSeaDark",
|
||||
name = R.string.deep_sea_dark_theme_name,
|
||||
available = { true }
|
||||
) {
|
||||
darkScheme
|
||||
}
|
||||
|
||||
@Composable
|
||||
@Preview
|
||||
private fun PreviewThemeLight() {
|
||||
ThemePreview(DeepSeaLight)
|
||||
}
|
||||
|
||||
@Composable
|
||||
@Preview
|
||||
private fun PreviewThemeDark() {
|
||||
ThemePreview(DeepSeaDark)
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package org.futo.inputmethod.latin.uix.theme.presets
|
||||
|
||||
import androidx.compose.material3.darkColorScheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import org.futo.inputmethod.latin.R
|
||||
import org.futo.inputmethod.latin.uix.theme.ThemeOption
|
||||
import org.futo.inputmethod.latin.uix.theme.selector.ThemePreview
|
||||
|
||||
private val primaryDark = Color(0xFF67FB59)
|
||||
private val onPrimaryDark = Color(0xFF003A02)
|
||||
private val primaryContainerDark = Color(0xFF35CF31)
|
||||
private val onPrimaryContainerDark = Color(0xFF003001)
|
||||
private val secondaryDark = Color(0xFF8CD97C)
|
||||
private val onSecondaryDark = Color(0xFF003A02)
|
||||
private val secondaryContainerDark = Color(0xFF004B03)
|
||||
private val onSecondaryContainerDark = Color(0xFF99E788)
|
||||
private val tertiaryDark = Color(0xFF52F5F4)
|
||||
private val onTertiaryDark = Color(0xFF003737)
|
||||
private val tertiaryContainerDark = Color(0xFF00CAC9)
|
||||
private val onTertiaryContainerDark = Color(0xFF002F2F)
|
||||
private val errorDark = Color(0xFFFFB4AB)
|
||||
private val onErrorDark = Color(0xFF690005)
|
||||
private val errorContainerDark = Color(0xFF93000A)
|
||||
private val onErrorContainerDark = Color(0xFFFFDAD6)
|
||||
private val backgroundDark = Color(0xFF0D1A0B)
|
||||
private val onBackgroundDark = Color(0xFFDCE6D4)
|
||||
private val surfaceDark = Color(0xFF0D1A0B)
|
||||
private val onSurfaceDark = Color(0xFFDCE5D5)
|
||||
private val surfaceVariantDark = Color(0xFF3E4A39)
|
||||
private val onSurfaceVariantDark = Color(0xFFBCCBB4)
|
||||
private val outlineDark = Color(0xFF879580)
|
||||
private val outlineVariantDark = Color(0xFF3E4A39)
|
||||
private val scrimDark = Color(0xFF000000)
|
||||
private val inverseSurfaceDark = Color(0xFFDCE5D5)
|
||||
private val inverseOnSurfaceDark = Color(0xFF2B3327)
|
||||
private val inversePrimaryDark = Color(0xFF006E08)
|
||||
private val surfaceDimDark = Color(0xFF0E150C)
|
||||
private val surfaceBrightDark = Color(0xFF333B30)
|
||||
private val surfaceContainerLowestDark = Color(0xFF091007)
|
||||
private val surfaceContainerLowDark = Color(0xFF161E13)
|
||||
private val surfaceContainerDark = Color(0xFF1A2217)
|
||||
private val surfaceContainerHighDark = Color(0xFF242C21)
|
||||
private val surfaceContainerHighestDark = Color(0xFF2F372B)
|
||||
|
||||
private val darkScheme = darkColorScheme(
|
||||
primary = primaryDark,
|
||||
onPrimary = onPrimaryDark,
|
||||
primaryContainer = primaryContainerDark,
|
||||
onPrimaryContainer = onPrimaryContainerDark,
|
||||
secondary = secondaryDark,
|
||||
onSecondary = onSecondaryDark,
|
||||
secondaryContainer = secondaryContainerDark,
|
||||
onSecondaryContainer = onSecondaryContainerDark,
|
||||
tertiary = tertiaryDark,
|
||||
onTertiary = onTertiaryDark,
|
||||
tertiaryContainer = tertiaryContainerDark,
|
||||
onTertiaryContainer = onTertiaryContainerDark,
|
||||
error = errorDark,
|
||||
onError = onErrorDark,
|
||||
errorContainer = errorContainerDark,
|
||||
onErrorContainer = onErrorContainerDark,
|
||||
background = backgroundDark,
|
||||
onBackground = onBackgroundDark,
|
||||
surface = surfaceDark,
|
||||
onSurface = onSurfaceDark,
|
||||
surfaceVariant = surfaceVariantDark,
|
||||
onSurfaceVariant = onSurfaceVariantDark,
|
||||
outline = outlineDark,
|
||||
outlineVariant = outlineVariantDark,
|
||||
scrim = scrimDark,
|
||||
inverseSurface = inverseSurfaceDark,
|
||||
inverseOnSurface = inverseOnSurfaceDark,
|
||||
inversePrimary = inversePrimaryDark,
|
||||
surfaceDim = surfaceDimDark,
|
||||
surfaceBright = surfaceBrightDark,
|
||||
surfaceContainerLowest = surfaceContainerLowestDark,
|
||||
surfaceContainerLow = surfaceContainerLowDark,
|
||||
surfaceContainer = surfaceContainerDark,
|
||||
surfaceContainerHigh = surfaceContainerHighDark,
|
||||
surfaceContainerHighest = surfaceContainerHighestDark,
|
||||
)
|
||||
|
||||
val Emerald = ThemeOption(
|
||||
dynamic = false,
|
||||
key = "Emerald",
|
||||
name = R.string.emerald_theme_name,
|
||||
available = { true }
|
||||
) {
|
||||
darkScheme
|
||||
}
|
||||
|
||||
@Composable
|
||||
@Preview
|
||||
private fun PreviewThemeDark() {
|
||||
ThemePreview(Emerald)
|
||||
}
|
@ -0,0 +1,99 @@
|
||||
package org.futo.inputmethod.latin.uix.theme.presets
|
||||
|
||||
import androidx.compose.material3.lightColorScheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import org.futo.inputmethod.latin.R
|
||||
import org.futo.inputmethod.latin.uix.theme.ThemeOption
|
||||
import org.futo.inputmethod.latin.uix.theme.selector.ThemePreview
|
||||
|
||||
private val primaryLightHighContrast = Color(0xFF212223)
|
||||
private val onPrimaryLightHighContrast = Color(0xFFFFFFFF)
|
||||
private val primaryContainerLightHighContrast = Color(0xFF424343)
|
||||
private val onPrimaryContainerLightHighContrast = Color(0xFFFFFFFF)
|
||||
private val secondaryLightHighContrast = Color(0xFF222222)
|
||||
private val onSecondaryLightHighContrast = Color(0xFFFFFFFF)
|
||||
private val secondaryContainerLightHighContrast = Color(0xFF434343)
|
||||
private val onSecondaryContainerLightHighContrast = Color(0xFFFFFFFF)
|
||||
private val tertiaryLightHighContrast = Color(0xFF242223)
|
||||
private val onTertiaryLightHighContrast = Color(0xFFFFFFFF)
|
||||
private val tertiaryContainerLightHighContrast = Color(0xFF454244)
|
||||
private val onTertiaryContainerLightHighContrast = Color(0xFFFFFFFF)
|
||||
private val errorLightHighContrast = Color(0xFF4E0002)
|
||||
private val onErrorLightHighContrast = Color(0xFFFFFFFF)
|
||||
private val errorContainerLightHighContrast = Color(0xFF8C0009)
|
||||
private val onErrorContainerLightHighContrast = Color(0xFFFFFFFF)
|
||||
private val backgroundLightHighContrast = Color(0xFFF8F8F8)
|
||||
private val onBackgroundLightHighContrast = Color(0xFF1C1B1B)
|
||||
private val surfaceLightHighContrast = Color(0xFFF8F8F8)
|
||||
private val onSurfaceLightHighContrast = Color(0xFF000000)
|
||||
private val surfaceVariantLightHighContrast = Color(0xFFE0E3E3)
|
||||
private val onSurfaceVariantLightHighContrast = Color(0xFF212525)
|
||||
private val outlineLightHighContrast = Color(0xFF404344)
|
||||
private val outlineVariantLightHighContrast = Color(0xFF404344)
|
||||
private val scrimLightHighContrast = Color(0xFF000000)
|
||||
private val inverseSurfaceLightHighContrast = Color(0xFF313030)
|
||||
private val inverseOnSurfaceLightHighContrast = Color(0xFFFFFFFF)
|
||||
private val inversePrimaryLightHighContrast = Color(0xFFECECEC)
|
||||
private val surfaceDimLightHighContrast = Color(0xFFDDD9D9)
|
||||
private val surfaceBrightLightHighContrast = Color(0xFFFCF8F8)
|
||||
private val surfaceContainerLowestLightHighContrast = Color(0xFFFFFFFF)
|
||||
private val surfaceContainerLowLightHighContrast = Color(0xFFF7F3F2)
|
||||
private val surfaceContainerLightHighContrast = Color(0xFFF1EDEC)
|
||||
private val surfaceContainerHighLightHighContrast = Color(0xFFEBE7E7)
|
||||
private val surfaceContainerHighestLightHighContrast = Color(0xFFE5E2E1)
|
||||
|
||||
private val highContrastLightColorScheme = lightColorScheme(
|
||||
primary = primaryLightHighContrast,
|
||||
onPrimary = onPrimaryLightHighContrast,
|
||||
primaryContainer = primaryContainerLightHighContrast,
|
||||
onPrimaryContainer = onPrimaryContainerLightHighContrast,
|
||||
secondary = secondaryLightHighContrast,
|
||||
onSecondary = onSecondaryLightHighContrast,
|
||||
secondaryContainer = secondaryContainerLightHighContrast,
|
||||
onSecondaryContainer = onSecondaryContainerLightHighContrast,
|
||||
tertiary = tertiaryLightHighContrast,
|
||||
onTertiary = onTertiaryLightHighContrast,
|
||||
tertiaryContainer = tertiaryContainerLightHighContrast,
|
||||
onTertiaryContainer = onTertiaryContainerLightHighContrast,
|
||||
error = errorLightHighContrast,
|
||||
onError = onErrorLightHighContrast,
|
||||
errorContainer = errorContainerLightHighContrast,
|
||||
onErrorContainer = onErrorContainerLightHighContrast,
|
||||
background = backgroundLightHighContrast,
|
||||
onBackground = onBackgroundLightHighContrast,
|
||||
surface = surfaceLightHighContrast,
|
||||
onSurface = onSurfaceLightHighContrast,
|
||||
surfaceVariant = surfaceVariantLightHighContrast,
|
||||
onSurfaceVariant = onSurfaceVariantLightHighContrast,
|
||||
outline = outlineLightHighContrast,
|
||||
outlineVariant = outlineVariantLightHighContrast,
|
||||
scrim = scrimLightHighContrast,
|
||||
inverseSurface = inverseSurfaceLightHighContrast,
|
||||
inverseOnSurface = inverseOnSurfaceLightHighContrast,
|
||||
inversePrimary = inversePrimaryLightHighContrast,
|
||||
surfaceDim = surfaceDimLightHighContrast,
|
||||
surfaceBright = surfaceBrightLightHighContrast,
|
||||
surfaceContainerLowest = surfaceContainerLowestLightHighContrast,
|
||||
surfaceContainerLow = surfaceContainerLowLightHighContrast,
|
||||
surfaceContainer = surfaceContainerLightHighContrast,
|
||||
surfaceContainerHigh = surfaceContainerHighLightHighContrast,
|
||||
surfaceContainerHighest = surfaceContainerHighestLightHighContrast,
|
||||
)
|
||||
|
||||
|
||||
val Snowfall = ThemeOption(
|
||||
dynamic = false,
|
||||
key = "Snowfall",
|
||||
name = R.string.snowfall_theme_name,
|
||||
available = { true }
|
||||
) {
|
||||
highContrastLightColorScheme
|
||||
}
|
||||
|
||||
@Composable
|
||||
@Preview
|
||||
private fun PreviewTheme() {
|
||||
ThemePreview(Snowfall)
|
||||
}
|
@ -0,0 +1,99 @@
|
||||
package org.futo.inputmethod.latin.uix.theme.presets
|
||||
|
||||
import androidx.compose.material3.lightColorScheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import org.futo.inputmethod.latin.R
|
||||
import org.futo.inputmethod.latin.uix.theme.ThemeOption
|
||||
import org.futo.inputmethod.latin.uix.theme.selector.ThemePreview
|
||||
|
||||
private val primaryLightHighContrast = Color(0xFF212223)
|
||||
private val onPrimaryLightHighContrast = Color(0xFFFFFFFF)
|
||||
private val primaryContainerLightHighContrast = Color(0xFF424343)
|
||||
private val onPrimaryContainerLightHighContrast = Color(0xFFFFFFFF)
|
||||
private val secondaryLightHighContrast = Color(0xFF222222)
|
||||
private val onSecondaryLightHighContrast = Color(0xFFFFFFFF)
|
||||
private val secondaryContainerLightHighContrast = Color(0xFF434343)
|
||||
private val onSecondaryContainerLightHighContrast = Color(0xFFFFFFFF)
|
||||
private val tertiaryLightHighContrast = Color(0xFF242223)
|
||||
private val onTertiaryLightHighContrast = Color(0xFFFFFFFF)
|
||||
private val tertiaryContainerLightHighContrast = Color(0xFF454244)
|
||||
private val onTertiaryContainerLightHighContrast = Color(0xFFFFFFFF)
|
||||
private val errorLightHighContrast = Color(0xFF4E0002)
|
||||
private val onErrorLightHighContrast = Color(0xFFFFFFFF)
|
||||
private val errorContainerLightHighContrast = Color(0xFF8C0009)
|
||||
private val onErrorContainerLightHighContrast = Color(0xFFFFFFFF)
|
||||
private val backgroundLightHighContrast = Color(0xFFA8A8A8)
|
||||
private val onBackgroundLightHighContrast = Color(0xFF1C1B1B)
|
||||
private val surfaceLightHighContrast = Color(0xFFBBBBBB)
|
||||
private val onSurfaceLightHighContrast = Color(0xFF000000)
|
||||
private val surfaceVariantLightHighContrast = Color(0xFFE0E3E3)
|
||||
private val onSurfaceVariantLightHighContrast = Color(0xFF212525)
|
||||
private val outlineLightHighContrast = Color(0xFF404344)
|
||||
private val outlineVariantLightHighContrast = Color(0xFF404344)
|
||||
private val scrimLightHighContrast = Color(0xFF000000)
|
||||
private val inverseSurfaceLightHighContrast = Color(0xFF313030)
|
||||
private val inverseOnSurfaceLightHighContrast = Color(0xFFFFFFFF)
|
||||
private val inversePrimaryLightHighContrast = Color(0xFFECECEC)
|
||||
private val surfaceDimLightHighContrast = Color(0xFFDDD9D9)
|
||||
private val surfaceBrightLightHighContrast = Color(0xFFFCF8F8)
|
||||
private val surfaceContainerLowestLightHighContrast = Color(0xFFFFFFFF)
|
||||
private val surfaceContainerLowLightHighContrast = Color(0xFFF7F3F2)
|
||||
private val surfaceContainerLightHighContrast = Color(0xFFF1EDEC)
|
||||
private val surfaceContainerHighLightHighContrast = Color(0xFFEBE7E7)
|
||||
private val surfaceContainerHighestLightHighContrast = Color(0xFFE5E2E1)
|
||||
|
||||
private val highContrastLightColorScheme = lightColorScheme(
|
||||
primary = primaryLightHighContrast,
|
||||
onPrimary = onPrimaryLightHighContrast,
|
||||
primaryContainer = primaryContainerLightHighContrast,
|
||||
onPrimaryContainer = onPrimaryContainerLightHighContrast,
|
||||
secondary = secondaryLightHighContrast,
|
||||
onSecondary = onSecondaryLightHighContrast,
|
||||
secondaryContainer = secondaryContainerLightHighContrast,
|
||||
onSecondaryContainer = onSecondaryContainerLightHighContrast,
|
||||
tertiary = tertiaryLightHighContrast,
|
||||
onTertiary = onTertiaryLightHighContrast,
|
||||
tertiaryContainer = tertiaryContainerLightHighContrast,
|
||||
onTertiaryContainer = onTertiaryContainerLightHighContrast,
|
||||
error = errorLightHighContrast,
|
||||
onError = onErrorLightHighContrast,
|
||||
errorContainer = errorContainerLightHighContrast,
|
||||
onErrorContainer = onErrorContainerLightHighContrast,
|
||||
background = backgroundLightHighContrast,
|
||||
onBackground = onBackgroundLightHighContrast,
|
||||
surface = surfaceLightHighContrast,
|
||||
onSurface = onSurfaceLightHighContrast,
|
||||
surfaceVariant = surfaceVariantLightHighContrast,
|
||||
onSurfaceVariant = onSurfaceVariantLightHighContrast,
|
||||
outline = outlineLightHighContrast,
|
||||
outlineVariant = outlineVariantLightHighContrast,
|
||||
scrim = scrimLightHighContrast,
|
||||
inverseSurface = inverseSurfaceLightHighContrast,
|
||||
inverseOnSurface = inverseOnSurfaceLightHighContrast,
|
||||
inversePrimary = inversePrimaryLightHighContrast,
|
||||
surfaceDim = surfaceDimLightHighContrast,
|
||||
surfaceBright = surfaceBrightLightHighContrast,
|
||||
surfaceContainerLowest = surfaceContainerLowestLightHighContrast,
|
||||
surfaceContainerLow = surfaceContainerLowLightHighContrast,
|
||||
surfaceContainer = surfaceContainerLightHighContrast,
|
||||
surfaceContainerHigh = surfaceContainerHighLightHighContrast,
|
||||
surfaceContainerHighest = surfaceContainerHighestLightHighContrast,
|
||||
)
|
||||
|
||||
|
||||
val SteelGray = ThemeOption(
|
||||
dynamic = false,
|
||||
key = "SteelGray",
|
||||
name = R.string.steel_gray_theme_name,
|
||||
available = { true }
|
||||
) {
|
||||
highContrastLightColorScheme
|
||||
}
|
||||
|
||||
@Composable
|
||||
@Preview
|
||||
private fun PreviewTheme() {
|
||||
ThemePreview(SteelGray)
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
package org.futo.inputmethod.latin.uix.theme.presets
|
||||
|
||||
import androidx.compose.material3.lightColorScheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import org.futo.inputmethod.latin.R
|
||||
import org.futo.inputmethod.latin.uix.theme.ThemeOption
|
||||
import org.futo.inputmethod.latin.uix.theme.selector.ThemePreview
|
||||
|
||||
private val primaryLight = Color(0xFF6D5E0F)
|
||||
private val onPrimaryLight = Color(0xFFFFFFFF)
|
||||
private val primaryContainerLight = Color(0xFFF8E287)
|
||||
private val onPrimaryContainerLight = Color(0xFF221B00)
|
||||
private val secondaryLight = Color(0xFF6E5E0E)
|
||||
private val onSecondaryLight = Color(0xFFFFFFFF)
|
||||
private val secondaryContainerLight = Color(0xFFF9E287)
|
||||
private val onSecondaryContainerLight = Color(0xFF221B00)
|
||||
private val tertiaryLight = Color(0xFF6E5D0E)
|
||||
private val onTertiaryLight = Color(0xFFFFFFFF)
|
||||
private val tertiaryContainerLight = Color(0xFFFAE287)
|
||||
private val onTertiaryContainerLight = Color(0xFF221B00)
|
||||
private val errorLight = Color(0xFFBA1A1A)
|
||||
private val onErrorLight = Color(0xFFFFFFFF)
|
||||
private val errorContainerLight = Color(0xFFFFDAD6)
|
||||
private val onErrorContainerLight = Color(0xFF410002)
|
||||
private val backgroundLight = Color(0xFFFFF9EE)
|
||||
private val onBackgroundLight = Color(0xFF1E1B13)
|
||||
private val surfaceLight = Color(0xFFFFF9ED)
|
||||
private val onSurfaceLight = Color(0xFF1E1C13)
|
||||
private val surfaceVariantLight = Color(0xFFEAE2D0)
|
||||
private val onSurfaceVariantLight = Color(0xFF4B4739)
|
||||
private val outlineLight = Color(0xFF7C7767)
|
||||
private val outlineVariantLight = Color(0xFFCDC6B4)
|
||||
private val scrimLight = Color(0xFF000000)
|
||||
private val inverseSurfaceLight = Color(0xFF333027)
|
||||
private val inverseOnSurfaceLight = Color(0xFFF7F0E2)
|
||||
private val inversePrimaryLight = Color(0xFFDBC66E)
|
||||
private val surfaceDimLight = Color(0xFFE0D9CC)
|
||||
private val surfaceBrightLight = Color(0xFFFFF9ED)
|
||||
private val surfaceContainerLowestLight = Color(0xFFFFFFFF)
|
||||
private val surfaceContainerLowLight = Color(0xFFFAF3E5)
|
||||
private val surfaceContainerLight = Color(0xFFF4EDDF)
|
||||
private val surfaceContainerHighLight = Color(0xFFEEE8DA)
|
||||
private val surfaceContainerHighestLight = Color(0xFFE8E2D4)
|
||||
|
||||
private val lightScheme = lightColorScheme(
|
||||
primary = primaryLight,
|
||||
onPrimary = onPrimaryLight,
|
||||
primaryContainer = primaryContainerLight,
|
||||
onPrimaryContainer = onPrimaryContainerLight,
|
||||
secondary = secondaryLight,
|
||||
onSecondary = onSecondaryLight,
|
||||
secondaryContainer = secondaryContainerLight,
|
||||
onSecondaryContainer = onSecondaryContainerLight,
|
||||
tertiary = tertiaryLight,
|
||||
onTertiary = onTertiaryLight,
|
||||
tertiaryContainer = tertiaryContainerLight,
|
||||
onTertiaryContainer = onTertiaryContainerLight,
|
||||
error = errorLight,
|
||||
onError = onErrorLight,
|
||||
errorContainer = errorContainerLight,
|
||||
onErrorContainer = onErrorContainerLight,
|
||||
background = backgroundLight,
|
||||
onBackground = onBackgroundLight,
|
||||
surface = surfaceLight,
|
||||
onSurface = onSurfaceLight,
|
||||
surfaceVariant = surfaceVariantLight,
|
||||
onSurfaceVariant = onSurfaceVariantLight,
|
||||
outline = outlineLight,
|
||||
outlineVariant = outlineVariantLight,
|
||||
scrim = scrimLight,
|
||||
inverseSurface = inverseSurfaceLight,
|
||||
inverseOnSurface = inverseOnSurfaceLight,
|
||||
inversePrimary = inversePrimaryLight,
|
||||
surfaceDim = surfaceDimLight,
|
||||
surfaceBright = surfaceBrightLight,
|
||||
surfaceContainerLowest = surfaceContainerLowestLight,
|
||||
surfaceContainerLow = surfaceContainerLowLight,
|
||||
surfaceContainer = surfaceContainerLight,
|
||||
surfaceContainerHigh = surfaceContainerHighLight,
|
||||
surfaceContainerHighest = surfaceContainerHighestLight,
|
||||
)
|
||||
|
||||
|
||||
val Sunflower = ThemeOption(
|
||||
dynamic = false,
|
||||
key = "Sunflower",
|
||||
name = R.string.sunflower_theme_name,
|
||||
available = { true }
|
||||
) {
|
||||
lightScheme
|
||||
}
|
||||
|
||||
@Composable
|
||||
@Preview
|
||||
private fun PreviewThemeLight() {
|
||||
ThemePreview(Sunflower)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user