diff --git a/app/build.gradle b/app/build.gradle index 333b684..3c92c66 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -146,6 +146,10 @@ dependencies { // https://github.com/aclassen/ComposeReorderable implementation "org.burnoutcrew.composereorderable:reorderable:0.9.6" + // https://github.com/gyf-dev/ImmersionBar + implementation 'com.geyifeng.immersionbar:immersionbar:3.2.2' + implementation 'com.geyifeng.immersionbar:immersionbar-ktx:3.2.2' + def accompanist_version = '0.31.3-beta' implementation "com.google.accompanist:accompanist-systemuicontroller:${accompanist_version}" implementation "com.google.accompanist:accompanist-navigation-animation:${accompanist_version}" diff --git a/app/src/main/java/com/github/jing332/tts_dict_editor/const/ConfigConst.kt b/app/src/main/java/com/github/jing332/tts_dict_editor/const/ConfigConst.kt index 02fe036..f43c88e 100644 --- a/app/src/main/java/com/github/jing332/tts_dict_editor/const/ConfigConst.kt +++ b/app/src/main/java/com/github/jing332/tts_dict_editor/const/ConfigConst.kt @@ -1,6 +1,7 @@ package com.github.jing332.tts_dict_editor.const object ConfigConst { + const val KEY_THEME = "theme" const val KEY_SOFT_KEYBOARD_TOOLBAR = "softKeyboardToolbar" const val KEY_DICT_EXPORT_FORMAT = "exportFormat" } \ No newline at end of file diff --git a/app/src/main/java/com/github/jing332/tts_dict_editor/help/AppConfig.kt b/app/src/main/java/com/github/jing332/tts_dict_editor/help/AppConfig.kt index ec40d40..715aa49 100644 --- a/app/src/main/java/com/github/jing332/tts_dict_editor/help/AppConfig.kt +++ b/app/src/main/java/com/github/jing332/tts_dict_editor/help/AppConfig.kt @@ -5,10 +5,12 @@ import com.funny.data_saver.core.DataSaverPreferences import com.funny.data_saver.core.mutableDataSaverStateOf import com.github.jing332.tts_dict_editor.app import com.github.jing332.tts_dict_editor.const.ConfigConst +import com.github.jing332.tts_dict_editor.ui.theme.AppTheme import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json +@OptIn(ExperimentalStdlibApi::class) object AppConfig { @OptIn(ExperimentalSerializationApi::class) private val json by lazy { @@ -33,10 +35,23 @@ object AppConfig { list } ) + + registerTypeConverters( + save = { it.id }, + restore = { value -> + AppTheme.values().find { it.id == value } ?: AppTheme.DEFAULT + } + ) } val dataSaverPref = DataSaverPreferences(app.getSharedPreferences("app", 0)) + val theme = mutableDataSaverStateOf( + dataSaverInterface = dataSaverPref, + key = ConfigConst.KEY_THEME, + initialValue = AppTheme.DEFAULT + ) + val softKeyboardToolbar = mutableDataSaverStateOf>>( dataSaverInterface = dataSaverPref, key = ConfigConst.KEY_SOFT_KEYBOARD_TOOLBAR, diff --git a/app/src/main/java/com/github/jing332/tts_dict_editor/ui/MainActivity.kt b/app/src/main/java/com/github/jing332/tts_dict_editor/ui/MainActivity.kt index cee7745..7c5f369 100644 --- a/app/src/main/java/com/github/jing332/tts_dict_editor/ui/MainActivity.kt +++ b/app/src/main/java/com/github/jing332/tts_dict_editor/ui/MainActivity.kt @@ -30,6 +30,7 @@ import com.github.jing332.tts_dict_editor.ui.edit.DictFileEditScreen import com.github.jing332.tts_dict_editor.ui.theme.AppTheme import com.github.jing332.tts_dict_editor.ui.widget.Widgets.TransparentSystemBars import com.github.jing332.tts_server_android.util.longToast +import io.github.lumyuan.turingbox.ui.theme.DictEditorTheme val LocalNavController = staticCompositionLocalOf { error("NavController has not been initialized! ") @@ -55,8 +56,8 @@ class MainActivity : ComponentActivity() { WindowCompat.setDecorFitsSystemWindows(window, false) setContent { - AppTheme { - TransparentSystemBars() + DictEditorTheme { +// TransparentSystemBars() Surface { AppNavigation() } diff --git a/app/src/main/java/com/github/jing332/tts_dict_editor/ui/MainScreen.kt b/app/src/main/java/com/github/jing332/tts_dict_editor/ui/MainScreen.kt index bde0f96..55c5b11 100644 --- a/app/src/main/java/com/github/jing332/tts_dict_editor/ui/MainScreen.kt +++ b/app/src/main/java/com/github/jing332/tts_dict_editor/ui/MainScreen.kt @@ -1,5 +1,6 @@ package com.github.jing332.tts_dict_editor.ui +import android.os.Build import android.os.Bundle import android.os.SystemClock import android.widget.Toast @@ -21,11 +22,10 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width import androidx.compose.foundation.rememberScrollState -import androidx.compose.foundation.text.selection.SelectionContainer import androidx.compose.foundation.verticalScroll import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Info -import androidx.compose.material.ripple.LocalRippleTheme +import androidx.compose.material.icons.filled.Style import androidx.compose.material.ripple.rememberRipple import androidx.compose.material3.Divider import androidx.compose.material3.DrawerState @@ -37,6 +37,7 @@ import androidx.compose.material3.NavigationDrawerItem import androidx.compose.material3.Text import androidx.compose.material3.rememberDrawerState import androidx.compose.runtime.Composable +import androidx.compose.runtime.MutableState import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableLongStateOf import androidx.compose.runtime.mutableStateOf @@ -63,17 +64,22 @@ import androidx.navigation.Navigator import com.github.jing332.tts_dict_editor.BuildConfig import com.github.jing332.tts_dict_editor.R import com.github.jing332.tts_dict_editor.ui.home.HomeScreen +import com.github.jing332.tts_dict_editor.ui.theme.AppTheme import com.talhafaki.composablesweettoast.util.SweetToastUtil +import io.github.lumyuan.turingbox.ui.theme.getAppTheme +import io.github.lumyuan.turingbox.ui.theme.setAppTheme import kotlinx.coroutines.launch import kotlinx.coroutines.withTimeout import java.text.SimpleDateFormat import java.util.Locale + @Composable fun MainScreen( drawerState: DrawerState = rememberDrawerState(DrawerValue.Closed), onFinishedActivity: () -> Unit, ) { + val context = LocalContext.current // var lastBackDownTime by remember { mutableLongStateOf(0L) } var toastMsg by remember { mutableStateOf("") } if (toastMsg.isNotEmpty()) { @@ -85,6 +91,28 @@ fun MainScreen( toastMsg = "" } + var warnMsg by remember { mutableStateOf("") } + if (warnMsg.isNotEmpty()) { + SweetToastUtil.SweetWarning( + message = warnMsg, + Toast.LENGTH_LONG, + PaddingValues(bottom = 32.dp) + ) + warnMsg = "" + } + + val isVisibleThemeDialog = remember { mutableStateOf(false) } + if (isVisibleThemeDialog.value) + ThemeSettingsDialog( + onDismissRequest = { isVisibleThemeDialog.value = false }, + currentTheme = getAppTheme(), + onChangeTheme = { + if (it == AppTheme.DYNAMIC_COLOR && Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {// SDK < A12 + warnMsg = context.getString(R.string.device_not_support_dynamic_theme) + } else setAppTheme(it) + } + ) + val snackbarHostState = LocalSnackbarHostState.current val navController = LocalNavController.current val scope = rememberCoroutineScope() @@ -118,7 +146,8 @@ fun MainScreen( .width(300.dp) .background(MaterialTheme.colorScheme.background) .padding(12.dp), - navController = navController + navController = navController, + isVisibleThemeDialog, ) } ) { @@ -128,7 +157,11 @@ fun MainScreen( @OptIn(ExperimentalFoundationApi::class) @Composable -private fun DrawerContent(modifier: Modifier, navController: NavHostController) { +private fun DrawerContent( + modifier: Modifier, + navController: NavHostController, + isVisibleThemeDialog: MutableState +) { val drawerItemIcon = @Composable { img: ImageVector, contentDescription: String -> Icon( img, @@ -138,15 +171,19 @@ private fun DrawerContent(modifier: Modifier, navController: NavHostController) ) } - val drawerItem = @Composable { img: ImageVector, targetScreen: AppNavRoutes -> + @Composable + fun drawerItem( + img: ImageVector, + targetScreen: AppNavRoutes, + onClick: () -> Unit = { navController.navigateSingleTop(targetScreen.route) } + ) { NavigationDrawerItem( icon = { drawerItemIcon(img, stringResource(id = targetScreen.titleResId)) }, label = { Text(text = stringResource(id = targetScreen.titleResId)) }, selected = false, - onClick = { navController.navigateSingleTop(targetScreen.route) } + onClick = onClick, ) } - Column(modifier = modifier.verticalScroll(rememberScrollState())) { Spacer(modifier = Modifier.height(24.dp)) val context = LocalContext.current @@ -209,6 +246,14 @@ private fun DrawerContent(modifier: Modifier, navController: NavHostController) .padding(vertical = 16.dp, horizontal = 4.dp) ) + NavigationDrawerItem( + icon = { drawerItemIcon(Icons.Filled.Style, stringResource(id = R.string.theme)) }, + label = { Text(text = stringResource(id = R.string.theme)) }, + selected = false, + onClick = { + isVisibleThemeDialog.value = true + }, + ) drawerItem(Icons.Filled.Info, AppNavRoutes.About) } } diff --git a/app/src/main/java/com/github/jing332/tts_dict_editor/ui/ThemeSettingsDialog.kt b/app/src/main/java/com/github/jing332/tts_dict_editor/ui/ThemeSettingsDialog.kt new file mode 100644 index 0000000..65638ff --- /dev/null +++ b/app/src/main/java/com/github/jing332/tts_dict_editor/ui/ThemeSettingsDialog.kt @@ -0,0 +1,62 @@ +package com.github.jing332.tts_dict_editor.ui + +import androidx.compose.foundation.layout.ExperimentalLayoutApi +import androidx.compose.foundation.layout.FlowRow +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Check +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.FilterChip +import androidx.compose.material3.Icon +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.Composable +import androidx.compose.ui.res.stringResource +import com.github.jing332.tts_dict_editor.R +import com.github.jing332.tts_dict_editor.ui.theme.AppTheme + +//@Preview +//@Composable +//private fun PreviewDialog() { +// var isVisible by remember { mutableStateOf(true) } +// if (isVisible) +// ThemeSettingsDialog({ +// isVisible = false +// }, { +// +// }) +// +//} + +@OptIn(ExperimentalLayoutApi::class, ExperimentalMaterial3Api::class) +@Composable +fun ThemeSettingsDialog( + onDismissRequest: () -> Unit, + currentTheme: AppTheme, + onChangeTheme: (AppTheme) -> Unit +) { + AlertDialog(onDismissRequest = onDismissRequest, + title = { + Text(text = stringResource(id = R.string.theme)) + }, confirmButton = { + TextButton(onClick = onDismissRequest) { + Text(stringResource(id = R.string.confirm)) + } + }, text = { + FlowRow { + AppTheme.values().forEach { + val leadingIcon: @Composable () -> Unit = { Icon(Icons.Default.Check, null) } +// var selected by remember { mutableStateOf(it == AppTheme.DEFAULT) } + val selected = currentTheme.id == it.id + FilterChip( + selected, + leadingIcon = if (selected) leadingIcon else null, + onClick = { + onChangeTheme(it) + }, + label = { Text(stringResource(id = it.stringResId)) } + ) + } + } + }) +} diff --git a/app/src/main/java/com/github/jing332/tts_dict_editor/ui/edit/DictFileEditActivity.kt b/app/src/main/java/com/github/jing332/tts_dict_editor/ui/edit/DictFileEditActivity.kt index 3d59759..1fbdd7a 100644 --- a/app/src/main/java/com/github/jing332/tts_dict_editor/ui/edit/DictFileEditActivity.kt +++ b/app/src/main/java/com/github/jing332/tts_dict_editor/ui/edit/DictFileEditActivity.kt @@ -41,9 +41,9 @@ import com.github.jing332.tts_dict_editor.R import com.github.jing332.tts_dict_editor.const.IntentKeys import com.github.jing332.tts_dict_editor.data.entites.DictFile import com.github.jing332.tts_dict_editor.ui.widget.Widgets -import com.github.jing332.tts_dict_editor.ui.theme.AppTheme import com.github.jing332.tts_dict_editor.utils.ASFUriUtils.getPath import com.github.jing332.tts_dict_editor.utils.FileUriTools.toContentUri +import io.github.lumyuan.turingbox.ui.theme.DictEditorTheme import me.saket.cascade.CascadeDropdownMenu @Suppress("DEPRECATION") @@ -59,8 +59,8 @@ class DictFileEditActivity : ComponentActivity() { vm.init(dictFile) setContent { - AppTheme { - Widgets.TransparentSystemBars() + DictEditorTheme { +// Widgets.TransparentSystemBars() Scaffold( modifier = Modifier.imePadding(), topBar = { diff --git a/app/src/main/java/com/github/jing332/tts_dict_editor/ui/filepicker/FilePickerActivity.kt b/app/src/main/java/com/github/jing332/tts_dict_editor/ui/filepicker/FilePickerActivity.kt index 76141dc..02471ba 100644 --- a/app/src/main/java/com/github/jing332/tts_dict_editor/ui/filepicker/FilePickerActivity.kt +++ b/app/src/main/java/com/github/jing332/tts_dict_editor/ui/filepicker/FilePickerActivity.kt @@ -53,6 +53,7 @@ import com.github.jing332.tts_dict_editor.utils.FileTools import com.github.jing332.tts_dict_editor.utils.FileUriTools.toContentUri import com.github.jing332.tts_server_android.util.longToast import com.github.jing332.tts_server_android.util.toast +import io.github.lumyuan.turingbox.ui.theme.DictEditorTheme import java.net.URLDecoder import java.net.URLEncoder @@ -132,8 +133,8 @@ class FilePickerActivity : ComponentActivity() { checkFileReadPermission() setContent { - AppTheme { - Widgets.TransparentSystemBars() + DictEditorTheme { +// Widgets.TransparentSystemBars() var title by remember { mutableStateOf("") } Scaffold( topBar = { diff --git a/app/src/main/java/com/github/jing332/tts_dict_editor/ui/replace/ReplaceRuleActivity.kt b/app/src/main/java/com/github/jing332/tts_dict_editor/ui/replace/ReplaceRuleActivity.kt index ca2fbc9..2dfc400 100644 --- a/app/src/main/java/com/github/jing332/tts_dict_editor/ui/replace/ReplaceRuleActivity.kt +++ b/app/src/main/java/com/github/jing332/tts_dict_editor/ui/replace/ReplaceRuleActivity.kt @@ -25,10 +25,9 @@ import com.github.jing332.tts_dict_editor.help.ReplaceRule import com.github.jing332.tts_dict_editor.help.ReplaceRuleGroup import com.github.jing332.tts_dict_editor.ui.navigateSingleTop import com.github.jing332.tts_dict_editor.ui.replace.edit.RuleEditScreen -import com.github.jing332.tts_dict_editor.ui.theme.AppTheme -import com.github.jing332.tts_dict_editor.ui.widget.Widgets import com.github.jing332.tts_dict_editor.utils.ASFUriUtils.getPath import com.github.jing332.tts_dict_editor.utils.observeNoSticky +import io.github.lumyuan.turingbox.ui.theme.DictEditorTheme import kotlinx.coroutines.launch var isKeyboardVisibleState = mutableStateOf(false) @@ -94,8 +93,8 @@ class ReplaceRuleActivity : ComponentActivity() { } setContent { - AppTheme { - Widgets.TransparentSystemBars() + DictEditorTheme { +// Widgets.TransparentSystemBars() CompositionLocalProvider( LocalDataSaver provides AppConfig.dataSaverPref, ) { diff --git a/app/src/main/java/com/github/jing332/tts_dict_editor/ui/theme/AppTheme.kt b/app/src/main/java/com/github/jing332/tts_dict_editor/ui/theme/AppTheme.kt new file mode 100644 index 0000000..7f72dd8 --- /dev/null +++ b/app/src/main/java/com/github/jing332/tts_dict_editor/ui/theme/AppTheme.kt @@ -0,0 +1,17 @@ +package com.github.jing332.tts_dict_editor.ui.theme + +import com.github.jing332.tts_dict_editor.R + +enum class AppTheme(val id: String, val stringResId: Int = -1) { + DEFAULT("", R.string.theme_default), + DYNAMIC_COLOR("dynamicColor", R.string.dynamic_color), + GREEN("green", R.string.green), + RED("red", R.string.red), + PINK("pink", R.string.pink ), + BLUE("blue", R.string.blue), + CYAN("cyan", R.string.cyan), + ORANGE("orange", R.string.orange), + PURPLE("purple", R.string.purple), + BROWN("brown", R.string.brown), + GRAY("gray", R.string.gray) +} \ No newline at end of file diff --git a/app/src/main/java/com/github/jing332/tts_dict_editor/ui/theme/AppThemeConfiguration.kt b/app/src/main/java/com/github/jing332/tts_dict_editor/ui/theme/AppThemeConfiguration.kt new file mode 100644 index 0000000..2b0e03c --- /dev/null +++ b/app/src/main/java/com/github/jing332/tts_dict_editor/ui/theme/AppThemeConfiguration.kt @@ -0,0 +1,883 @@ +package com.github.jing332.tts_dict_editor.ui.theme + +import android.content.Context +import android.os.Build +import androidx.compose.animation.animateColorAsState +import androidx.compose.animation.core.FastOutLinearInEasing +import androidx.compose.animation.core.TweenSpec +import androidx.compose.material3.ColorScheme +import androidx.compose.material3.darkColorScheme +import androidx.compose.material3.dynamicDarkColorScheme +import androidx.compose.material3.dynamicLightColorScheme +import androidx.compose.material3.lightColorScheme +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.platform.LocalContext + +/** + * 默认主题 + */ +@Composable +fun defaultTheme( + darkTheme: Boolean +): ColorScheme = + if (!darkTheme) + lightColorScheme( + primary = bean_green_seed, + onPrimary = bean_green_md_theme_light_onPrimary, + primaryContainer = bean_green_md_theme_light_primaryContainer, + onPrimaryContainer = bean_green_md_theme_light_onPrimaryContainer, + secondary = bean_green_md_theme_light_secondary, + onSecondary = bean_green_md_theme_light_onSecondary, + secondaryContainer = bean_green_md_theme_light_secondaryContainer, + onSecondaryContainer = bean_green_md_theme_light_onSecondaryContainer, + tertiary = bean_green_md_theme_light_tertiary, + onTertiary = bean_green_md_theme_light_onTertiary, + tertiaryContainer = bean_green_md_theme_light_tertiaryContainer, + onTertiaryContainer = bean_green_md_theme_light_onTertiaryContainer, + error = bean_green_md_theme_light_error, + errorContainer = bean_green_md_theme_light_errorContainer, + onError = bean_green_md_theme_light_onError, + onErrorContainer = bean_green_md_theme_light_onErrorContainer, + background = bean_green_md_theme_light_background, + onBackground = bean_green_md_theme_light_onBackground, + outline = bean_green_md_theme_light_outline, + inverseOnSurface = bean_green_md_theme_light_inverseOnSurface, + inverseSurface = bean_green_md_theme_light_inverseSurface, + inversePrimary = bean_green_md_theme_light_inversePrimary, + surfaceTint = bean_green_md_theme_light_surfaceTint, + outlineVariant = bean_green_md_theme_light_outlineVariant, + scrim = bean_green_md_theme_light_scrim, + surface = bean_green_md_theme_light_surface, + onSurface = bean_green_md_theme_light_onSurface, + surfaceVariant = bean_green_md_theme_light_surfaceVariant, + onSurfaceVariant = bean_green_md_theme_light_onSurfaceVariant, + ) + else + darkColorScheme( + primary = bean_green_md_theme_dark_primary, + onPrimary = bean_green_md_theme_dark_onPrimary, + primaryContainer = bean_green_md_theme_dark_primaryContainer, + onPrimaryContainer = bean_green_md_theme_dark_onPrimaryContainer, + secondary = bean_green_md_theme_dark_secondary, + onSecondary = bean_green_md_theme_dark_onSecondary, + secondaryContainer = bean_green_md_theme_dark_secondaryContainer, + onSecondaryContainer = bean_green_md_theme_dark_onSecondaryContainer, + tertiary = bean_green_md_theme_dark_tertiary, + onTertiary = bean_green_md_theme_dark_onTertiary, + tertiaryContainer = bean_green_md_theme_dark_tertiaryContainer, + onTertiaryContainer = bean_green_md_theme_dark_onTertiaryContainer, + error = bean_green_md_theme_dark_error, + errorContainer = bean_green_md_theme_dark_errorContainer, + onError = bean_green_md_theme_dark_onError, + onErrorContainer = bean_green_md_theme_dark_onErrorContainer, + background = bean_green_md_theme_dark_background, + onBackground = bean_green_md_theme_dark_onBackground, + outline = bean_green_md_theme_dark_outline, + inverseOnSurface = bean_green_md_theme_dark_inverseOnSurface, + inverseSurface = bean_green_md_theme_dark_inverseSurface, + inversePrimary = bean_green_md_theme_dark_inversePrimary, + surfaceTint = bean_green_md_theme_dark_surfaceTint, + outlineVariant = bean_green_md_theme_dark_outlineVariant, + scrim = bean_green_md_theme_dark_scrim, + surface = bean_green_md_theme_dark_surface, + onSurface = bean_green_md_theme_dark_onSurface, + surfaceVariant = bean_green_md_theme_dark_surfaceVariant, + onSurfaceVariant = bean_green_md_theme_dark_onSurfaceVariant, + ) + + +/** + * 动态颜色主题 + */ +@Composable +fun dynamicColorTheme( + darkTheme: Boolean, + context: Context = LocalContext.current +): ColorScheme = + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) + if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context) + else + defaultTheme(darkTheme) + +/** + * 绿色 + */ +@Composable +fun greenTheme( + darkTheme: Boolean +): ColorScheme = + if (!darkTheme) + lightColorScheme( + primary = green_seed, + onPrimary = green_md_theme_light_onPrimary, + primaryContainer = green_md_theme_light_primaryContainer, + onPrimaryContainer = green_md_theme_light_onPrimaryContainer, + secondary = green_md_theme_light_secondary, + onSecondary = green_md_theme_light_onSecondary, + secondaryContainer = green_md_theme_light_secondaryContainer, + onSecondaryContainer = green_md_theme_light_onSecondaryContainer, + tertiary = green_md_theme_light_tertiary, + onTertiary = green_md_theme_light_onTertiary, + tertiaryContainer = green_md_theme_light_tertiaryContainer, + onTertiaryContainer = green_md_theme_light_onTertiaryContainer, + error = green_md_theme_light_error, + errorContainer = green_md_theme_light_errorContainer, + onError = green_md_theme_light_onError, + onErrorContainer = green_md_theme_light_onErrorContainer, + background = green_md_theme_light_background, + onBackground = green_md_theme_light_onBackground, + outline = green_md_theme_light_outline, + inverseOnSurface = green_md_theme_light_inverseOnSurface, + inverseSurface = green_md_theme_light_inverseSurface, + inversePrimary = green_md_theme_light_inversePrimary, + surfaceTint = green_md_theme_light_surfaceTint, + outlineVariant = green_md_theme_light_outlineVariant, + scrim = green_md_theme_light_scrim, + surface = green_md_theme_light_surface, + onSurface = green_md_theme_light_onSurface, + surfaceVariant = green_md_theme_light_surfaceVariant, + onSurfaceVariant = green_md_theme_light_onSurfaceVariant, + ) + else + darkColorScheme( + primary = green_md_theme_dark_primary, + onPrimary = green_md_theme_dark_onPrimary, + primaryContainer = green_md_theme_dark_primaryContainer, + onPrimaryContainer = green_md_theme_dark_onPrimaryContainer, + secondary = green_md_theme_dark_secondary, + onSecondary = green_md_theme_dark_onSecondary, + secondaryContainer = green_md_theme_dark_secondaryContainer, + onSecondaryContainer = green_md_theme_dark_onSecondaryContainer, + tertiary = green_md_theme_dark_tertiary, + onTertiary = green_md_theme_dark_onTertiary, + tertiaryContainer = green_md_theme_dark_tertiaryContainer, + onTertiaryContainer = green_md_theme_dark_onTertiaryContainer, + error = green_md_theme_dark_error, + errorContainer = green_md_theme_dark_errorContainer, + onError = green_md_theme_dark_onError, + onErrorContainer = green_md_theme_dark_onErrorContainer, + background = green_md_theme_dark_background, + onBackground = green_md_theme_dark_onBackground, + outline = green_md_theme_dark_outline, + inverseOnSurface = green_md_theme_dark_inverseOnSurface, + inverseSurface = green_md_theme_dark_inverseSurface, + inversePrimary = green_md_theme_dark_inversePrimary, + surfaceTint = green_md_theme_dark_surfaceTint, + outlineVariant = green_md_theme_dark_outlineVariant, + scrim = green_md_theme_dark_scrim, + surface = green_md_theme_dark_surface, + onSurface = green_md_theme_dark_onSurface, + surfaceVariant = green_md_theme_dark_surfaceVariant, + onSurfaceVariant = green_md_theme_dark_onSurfaceVariant, + ) + +/** + * 红色 + */ +@Composable +fun redTheme( + darkTheme: Boolean +): ColorScheme = + if (!darkTheme) + lightColorScheme( + primary = red_seed, + onPrimary = red_md_theme_light_onPrimary, + primaryContainer = red_md_theme_light_primaryContainer, + onPrimaryContainer = red_md_theme_light_onPrimaryContainer, + secondary = red_md_theme_light_secondary, + onSecondary = red_md_theme_light_onSecondary, + secondaryContainer = red_md_theme_light_secondaryContainer, + onSecondaryContainer = red_md_theme_light_onSecondaryContainer, + tertiary = red_md_theme_light_tertiary, + onTertiary = red_md_theme_light_onTertiary, + tertiaryContainer = red_md_theme_light_tertiaryContainer, + onTertiaryContainer = red_md_theme_light_onTertiaryContainer, + error = red_md_theme_light_error, + errorContainer = red_md_theme_light_errorContainer, + onError = red_md_theme_light_onError, + onErrorContainer = red_md_theme_light_onErrorContainer, + background = red_md_theme_light_background, + onBackground = red_md_theme_light_onBackground, + outline = red_md_theme_light_outline, + inverseOnSurface = red_md_theme_light_inverseOnSurface, + inverseSurface = red_md_theme_light_inverseSurface, + inversePrimary = red_md_theme_light_inversePrimary, + surfaceTint = red_md_theme_light_surfaceTint, + outlineVariant = red_md_theme_light_outlineVariant, + scrim = red_md_theme_light_scrim, + surface = red_md_theme_light_surface, + onSurface = red_md_theme_light_onSurface, + surfaceVariant = red_md_theme_light_surfaceVariant, + onSurfaceVariant = red_md_theme_light_onSurfaceVariant, + ) + else + darkColorScheme( + primary = red_md_theme_dark_primary, + onPrimary = red_md_theme_dark_onPrimary, + primaryContainer = red_md_theme_dark_primaryContainer, + onPrimaryContainer = red_md_theme_dark_onPrimaryContainer, + secondary = red_md_theme_dark_secondary, + onSecondary = red_md_theme_dark_onSecondary, + secondaryContainer = red_md_theme_dark_secondaryContainer, + onSecondaryContainer = red_md_theme_dark_onSecondaryContainer, + tertiary = red_md_theme_dark_tertiary, + onTertiary = red_md_theme_dark_onTertiary, + tertiaryContainer = red_md_theme_dark_tertiaryContainer, + onTertiaryContainer = red_md_theme_dark_onTertiaryContainer, + error = red_md_theme_dark_error, + errorContainer = red_md_theme_dark_errorContainer, + onError = red_md_theme_dark_onError, + onErrorContainer = red_md_theme_dark_onErrorContainer, + background = red_md_theme_dark_background, + onBackground = red_md_theme_dark_onBackground, + outline = red_md_theme_dark_outline, + inverseOnSurface = red_md_theme_dark_inverseOnSurface, + inverseSurface = red_md_theme_dark_inverseSurface, + inversePrimary = red_md_theme_dark_inversePrimary, + surfaceTint = red_md_theme_dark_surfaceTint, + outlineVariant = red_md_theme_dark_outlineVariant, + scrim = red_md_theme_dark_scrim, + surface = red_md_theme_dark_surface, + onSurface = red_md_theme_dark_onSurface, + surfaceVariant = red_md_theme_dark_surfaceVariant, + onSurfaceVariant = red_md_theme_dark_onSurfaceVariant, + ) + +/** + * 粉色 + */ +@Composable +fun pinkTheme( + darkTheme: Boolean +): ColorScheme = + if (!darkTheme) + lightColorScheme( + primary = pink_seed, + onPrimary = pink_md_theme_light_onPrimary, + primaryContainer = pink_md_theme_light_primaryContainer, + onPrimaryContainer = pink_md_theme_light_onPrimaryContainer, + secondary = pink_md_theme_light_secondary, + onSecondary = pink_md_theme_light_onSecondary, + secondaryContainer = pink_md_theme_light_secondaryContainer, + onSecondaryContainer = pink_md_theme_light_onSecondaryContainer, + tertiary = pink_md_theme_light_tertiary, + onTertiary = pink_md_theme_light_onTertiary, + tertiaryContainer = pink_md_theme_light_tertiaryContainer, + onTertiaryContainer = pink_md_theme_light_onTertiaryContainer, + error = pink_md_theme_light_error, + errorContainer = pink_md_theme_light_errorContainer, + onError = pink_md_theme_light_onError, + onErrorContainer = pink_md_theme_light_onErrorContainer, + background = pink_md_theme_light_background, + onBackground = pink_md_theme_light_onBackground, + outline = pink_md_theme_light_outline, + inverseOnSurface = pink_md_theme_light_inverseOnSurface, + inverseSurface = pink_md_theme_light_inverseSurface, + inversePrimary = pink_md_theme_light_inversePrimary, + surfaceTint = pink_md_theme_light_surfaceTint, + outlineVariant = pink_md_theme_light_outlineVariant, + scrim = pink_md_theme_light_scrim, + surface = pink_md_theme_light_surface, + onSurface = pink_md_theme_light_onSurface, + surfaceVariant = pink_md_theme_light_surfaceVariant, + onSurfaceVariant = pink_md_theme_light_onSurfaceVariant, + ) + else + darkColorScheme( + primary = pink_md_theme_dark_primary, + onPrimary = pink_md_theme_dark_onPrimary, + primaryContainer = pink_md_theme_dark_primaryContainer, + onPrimaryContainer = pink_md_theme_dark_onPrimaryContainer, + secondary = pink_md_theme_dark_secondary, + onSecondary = pink_md_theme_dark_onSecondary, + secondaryContainer = pink_md_theme_dark_secondaryContainer, + onSecondaryContainer = pink_md_theme_dark_onSecondaryContainer, + tertiary = pink_md_theme_dark_tertiary, + onTertiary = pink_md_theme_dark_onTertiary, + tertiaryContainer = pink_md_theme_dark_tertiaryContainer, + onTertiaryContainer = pink_md_theme_dark_onTertiaryContainer, + error = pink_md_theme_dark_error, + errorContainer = pink_md_theme_dark_errorContainer, + onError = pink_md_theme_dark_onError, + onErrorContainer = pink_md_theme_dark_onErrorContainer, + background = pink_md_theme_dark_background, + onBackground = pink_md_theme_dark_onBackground, + outline = pink_md_theme_dark_outline, + inverseOnSurface = pink_md_theme_dark_inverseOnSurface, + inverseSurface = pink_md_theme_dark_inverseSurface, + inversePrimary = pink_md_theme_dark_inversePrimary, + surfaceTint = pink_md_theme_dark_surfaceTint, + outlineVariant = pink_md_theme_dark_outlineVariant, + scrim = pink_md_theme_dark_scrim, + surface = pink_md_theme_dark_surface, + onSurface = pink_md_theme_dark_onSurface, + surfaceVariant = pink_md_theme_dark_surfaceVariant, + onSurfaceVariant = pink_md_theme_dark_onSurfaceVariant, + ) + +/** + * 蓝色 + */ +@Composable +fun blueTheme( + darkTheme: Boolean +): ColorScheme = + if (!darkTheme) + lightColorScheme( + primary = blue_seed, + onPrimary = blue_md_theme_light_onPrimary, + primaryContainer = blue_md_theme_light_primaryContainer, + onPrimaryContainer = blue_md_theme_light_onPrimaryContainer, + secondary = blue_md_theme_light_secondary, + onSecondary = blue_md_theme_light_onSecondary, + secondaryContainer = blue_md_theme_light_secondaryContainer, + onSecondaryContainer = blue_md_theme_light_onSecondaryContainer, + tertiary = blue_md_theme_light_tertiary, + onTertiary = blue_md_theme_light_onTertiary, + tertiaryContainer = blue_md_theme_light_tertiaryContainer, + onTertiaryContainer = blue_md_theme_light_onTertiaryContainer, + error = blue_md_theme_light_error, + errorContainer = blue_md_theme_light_errorContainer, + onError = blue_md_theme_light_onError, + onErrorContainer = blue_md_theme_light_onErrorContainer, + background = blue_md_theme_light_background, + onBackground = blue_md_theme_light_onBackground, + outline = blue_md_theme_light_outline, + inverseOnSurface = blue_md_theme_light_inverseOnSurface, + inverseSurface = blue_md_theme_light_inverseSurface, + inversePrimary = blue_md_theme_light_inversePrimary, + surfaceTint = blue_md_theme_light_surfaceTint, + outlineVariant = blue_md_theme_light_outlineVariant, + scrim = blue_md_theme_light_scrim, + surface = blue_md_theme_light_surface, + onSurface = blue_md_theme_light_onSurface, + surfaceVariant = blue_md_theme_light_surfaceVariant, + onSurfaceVariant = blue_md_theme_light_onSurfaceVariant, + ) + else + darkColorScheme( + primary = blue_md_theme_dark_primary, + onPrimary = blue_md_theme_dark_onPrimary, + primaryContainer = blue_md_theme_dark_primaryContainer, + onPrimaryContainer = blue_md_theme_dark_onPrimaryContainer, + secondary = blue_md_theme_dark_secondary, + onSecondary = blue_md_theme_dark_onSecondary, + secondaryContainer = blue_md_theme_dark_secondaryContainer, + onSecondaryContainer = blue_md_theme_dark_onSecondaryContainer, + tertiary = blue_md_theme_dark_tertiary, + onTertiary = blue_md_theme_dark_onTertiary, + tertiaryContainer = blue_md_theme_dark_tertiaryContainer, + onTertiaryContainer = blue_md_theme_dark_onTertiaryContainer, + error = blue_md_theme_dark_error, + errorContainer = blue_md_theme_dark_errorContainer, + onError = blue_md_theme_dark_onError, + onErrorContainer = blue_md_theme_dark_onErrorContainer, + background = blue_md_theme_dark_background, + onBackground = blue_md_theme_dark_onBackground, + outline = blue_md_theme_dark_outline, + inverseOnSurface = blue_md_theme_dark_inverseOnSurface, + inverseSurface = blue_md_theme_dark_inverseSurface, + inversePrimary = blue_md_theme_dark_inversePrimary, + surfaceTint = blue_md_theme_dark_surfaceTint, + outlineVariant = blue_md_theme_dark_outlineVariant, + scrim = blue_md_theme_dark_scrim, + surface = blue_md_theme_dark_surface, + onSurface = blue_md_theme_dark_onSurface, + surfaceVariant = blue_md_theme_dark_surfaceVariant, + onSurfaceVariant = blue_md_theme_dark_onSurfaceVariant, + ) + +/** + * 青色 + */ +@Composable +fun cyanTheme( + darkTheme: Boolean +): ColorScheme = + if (!darkTheme) + lightColorScheme( + primary = cyan_seed, + onPrimary = cyan_md_theme_light_onPrimary, + primaryContainer = cyan_md_theme_light_primaryContainer, + onPrimaryContainer = cyan_md_theme_light_onPrimaryContainer, + secondary = cyan_md_theme_light_secondary, + onSecondary = cyan_md_theme_light_onSecondary, + secondaryContainer = cyan_md_theme_light_secondaryContainer, + onSecondaryContainer = cyan_md_theme_light_onSecondaryContainer, + tertiary = cyan_md_theme_light_tertiary, + onTertiary = cyan_md_theme_light_onTertiary, + tertiaryContainer = cyan_md_theme_light_tertiaryContainer, + onTertiaryContainer = cyan_md_theme_light_onTertiaryContainer, + error = cyan_md_theme_light_error, + errorContainer = cyan_md_theme_light_errorContainer, + onError = cyan_md_theme_light_onError, + onErrorContainer = cyan_md_theme_light_onErrorContainer, + background = cyan_md_theme_light_background, + onBackground = cyan_md_theme_light_onBackground, + outline = cyan_md_theme_light_outline, + inverseOnSurface = cyan_md_theme_light_inverseOnSurface, + inverseSurface = cyan_md_theme_light_inverseSurface, + inversePrimary = cyan_md_theme_light_inversePrimary, + surfaceTint = cyan_md_theme_light_surfaceTint, + outlineVariant = cyan_md_theme_light_outlineVariant, + scrim = cyan_md_theme_light_scrim, + surface = cyan_md_theme_light_surface, + onSurface = cyan_md_theme_light_onSurface, + surfaceVariant = cyan_md_theme_light_surfaceVariant, + onSurfaceVariant = cyan_md_theme_light_onSurfaceVariant, + ) + else + darkColorScheme( + primary = cyan_md_theme_dark_primary, + onPrimary = cyan_md_theme_dark_onPrimary, + primaryContainer = cyan_md_theme_dark_primaryContainer, + onPrimaryContainer = cyan_md_theme_dark_onPrimaryContainer, + secondary = cyan_md_theme_dark_secondary, + onSecondary = cyan_md_theme_dark_onSecondary, + secondaryContainer = cyan_md_theme_dark_secondaryContainer, + onSecondaryContainer = cyan_md_theme_dark_onSecondaryContainer, + tertiary = cyan_md_theme_dark_tertiary, + onTertiary = cyan_md_theme_dark_onTertiary, + tertiaryContainer = cyan_md_theme_dark_tertiaryContainer, + onTertiaryContainer = cyan_md_theme_dark_onTertiaryContainer, + error = cyan_md_theme_dark_error, + errorContainer = cyan_md_theme_dark_errorContainer, + onError = cyan_md_theme_dark_onError, + onErrorContainer = cyan_md_theme_dark_onErrorContainer, + background = cyan_md_theme_dark_background, + onBackground = cyan_md_theme_dark_onBackground, + outline = cyan_md_theme_dark_outline, + inverseOnSurface = cyan_md_theme_dark_inverseOnSurface, + inverseSurface = cyan_md_theme_dark_inverseSurface, + inversePrimary = cyan_md_theme_dark_inversePrimary, + surfaceTint = cyan_md_theme_dark_surfaceTint, + outlineVariant = cyan_md_theme_dark_outlineVariant, + scrim = cyan_md_theme_dark_scrim, + surface = cyan_md_theme_dark_surface, + onSurface = cyan_md_theme_dark_onSurface, + surfaceVariant = cyan_md_theme_dark_surfaceVariant, + onSurfaceVariant = cyan_md_theme_dark_onSurfaceVariant, + ) + + +/** + * 橙色 + */ +@Composable +fun orangeTheme( + darkTheme: Boolean +): ColorScheme = + if (!darkTheme) + lightColorScheme( + primary = orange_seed, + onPrimary = orange_md_theme_light_onPrimary, + primaryContainer = orange_md_theme_light_primaryContainer, + onPrimaryContainer = orange_md_theme_light_onPrimaryContainer, + secondary = orange_md_theme_light_secondary, + onSecondary = orange_md_theme_light_onSecondary, + secondaryContainer = orange_md_theme_light_secondaryContainer, + onSecondaryContainer = orange_md_theme_light_onSecondaryContainer, + tertiary = orange_md_theme_light_tertiary, + onTertiary = orange_md_theme_light_onTertiary, + tertiaryContainer = orange_md_theme_light_tertiaryContainer, + onTertiaryContainer = orange_md_theme_light_onTertiaryContainer, + error = orange_md_theme_light_error, + errorContainer = orange_md_theme_light_errorContainer, + onError = orange_md_theme_light_onError, + onErrorContainer = orange_md_theme_light_onErrorContainer, + background = orange_md_theme_light_background, + onBackground = orange_md_theme_light_onBackground, + outline = orange_md_theme_light_outline, + inverseOnSurface = orange_md_theme_light_inverseOnSurface, + inverseSurface = orange_md_theme_light_inverseSurface, + inversePrimary = orange_md_theme_light_inversePrimary, + surfaceTint = orange_md_theme_light_surfaceTint, + outlineVariant = orange_md_theme_light_outlineVariant, + scrim = orange_md_theme_light_scrim, + surface = orange_md_theme_light_surface, + onSurface = orange_md_theme_light_onSurface, + surfaceVariant = orange_md_theme_light_surfaceVariant, + onSurfaceVariant = orange_md_theme_light_onSurfaceVariant, + ) + else + darkColorScheme( + primary = orange_md_theme_dark_primary, + onPrimary = orange_md_theme_dark_onPrimary, + primaryContainer = orange_md_theme_dark_primaryContainer, + onPrimaryContainer = orange_md_theme_dark_onPrimaryContainer, + secondary = orange_md_theme_dark_secondary, + onSecondary = orange_md_theme_dark_onSecondary, + secondaryContainer = orange_md_theme_dark_secondaryContainer, + onSecondaryContainer = orange_md_theme_dark_onSecondaryContainer, + tertiary = orange_md_theme_dark_tertiary, + onTertiary = orange_md_theme_dark_onTertiary, + tertiaryContainer = orange_md_theme_dark_tertiaryContainer, + onTertiaryContainer = orange_md_theme_dark_onTertiaryContainer, + error = orange_md_theme_dark_error, + errorContainer = orange_md_theme_dark_errorContainer, + onError = orange_md_theme_dark_onError, + onErrorContainer = orange_md_theme_dark_onErrorContainer, + background = orange_md_theme_dark_background, + onBackground = orange_md_theme_dark_onBackground, + outline = orange_md_theme_dark_outline, + inverseOnSurface = orange_md_theme_dark_inverseOnSurface, + inverseSurface = orange_md_theme_dark_inverseSurface, + inversePrimary = orange_md_theme_dark_inversePrimary, + surfaceTint = orange_md_theme_dark_surfaceTint, + outlineVariant = orange_md_theme_dark_outlineVariant, + scrim = orange_md_theme_dark_scrim, + surface = orange_md_theme_dark_surface, + onSurface = orange_md_theme_dark_onSurface, + surfaceVariant = orange_md_theme_dark_surfaceVariant, + onSurfaceVariant = orange_md_theme_dark_onSurfaceVariant, + ) + +/** + * 紫色 + */ +@Composable +fun purpleTheme( + darkTheme: Boolean +): ColorScheme = + if (!darkTheme) + lightColorScheme( + primary = purple_seed, + onPrimary = purple_md_theme_light_onPrimary, + primaryContainer = purple_md_theme_light_primaryContainer, + onPrimaryContainer = purple_md_theme_light_onPrimaryContainer, + secondary = purple_md_theme_light_secondary, + onSecondary = purple_md_theme_light_onSecondary, + secondaryContainer = purple_md_theme_light_secondaryContainer, + onSecondaryContainer = purple_md_theme_light_onSecondaryContainer, + tertiary = purple_md_theme_light_tertiary, + onTertiary = purple_md_theme_light_onTertiary, + tertiaryContainer = purple_md_theme_light_tertiaryContainer, + onTertiaryContainer = purple_md_theme_light_onTertiaryContainer, + error = purple_md_theme_light_error, + errorContainer = purple_md_theme_light_errorContainer, + onError = purple_md_theme_light_onError, + onErrorContainer = purple_md_theme_light_onErrorContainer, + background = purple_md_theme_light_background, + onBackground = purple_md_theme_light_onBackground, + outline = purple_md_theme_light_outline, + inverseOnSurface = purple_md_theme_light_inverseOnSurface, + inverseSurface = purple_md_theme_light_inverseSurface, + inversePrimary = purple_md_theme_light_inversePrimary, + surfaceTint = purple_md_theme_light_surfaceTint, + outlineVariant = purple_md_theme_light_outlineVariant, + scrim = purple_md_theme_light_scrim, + surface = purple_md_theme_light_surface, + onSurface = purple_md_theme_light_onSurface, + surfaceVariant = purple_md_theme_light_surfaceVariant, + onSurfaceVariant = purple_md_theme_light_onSurfaceVariant, + ) + else + darkColorScheme( + primary = purple_md_theme_dark_primary, + onPrimary = purple_md_theme_dark_onPrimary, + primaryContainer = purple_md_theme_dark_primaryContainer, + onPrimaryContainer = purple_md_theme_dark_onPrimaryContainer, + secondary = purple_md_theme_dark_secondary, + onSecondary = purple_md_theme_dark_onSecondary, + secondaryContainer = purple_md_theme_dark_secondaryContainer, + onSecondaryContainer = purple_md_theme_dark_onSecondaryContainer, + tertiary = purple_md_theme_dark_tertiary, + onTertiary = purple_md_theme_dark_onTertiary, + tertiaryContainer = purple_md_theme_dark_tertiaryContainer, + onTertiaryContainer = purple_md_theme_dark_onTertiaryContainer, + error = purple_md_theme_dark_error, + errorContainer = purple_md_theme_dark_errorContainer, + onError = purple_md_theme_dark_onError, + onErrorContainer = purple_md_theme_dark_onErrorContainer, + background = purple_md_theme_dark_background, + onBackground = purple_md_theme_dark_onBackground, + outline = purple_md_theme_dark_outline, + inverseOnSurface = purple_md_theme_dark_inverseOnSurface, + inverseSurface = purple_md_theme_dark_inverseSurface, + inversePrimary = purple_md_theme_dark_inversePrimary, + surfaceTint = purple_md_theme_dark_surfaceTint, + outlineVariant = purple_md_theme_dark_outlineVariant, + scrim = purple_md_theme_dark_scrim, + surface = purple_md_theme_dark_surface, + onSurface = purple_md_theme_dark_onSurface, + surfaceVariant = purple_md_theme_dark_surfaceVariant, + onSurfaceVariant = purple_md_theme_dark_onSurfaceVariant, + ) + +/** + * 棕色 + */ +@Composable +fun brownTheme( + darkTheme: Boolean +): ColorScheme = + if (!darkTheme) + lightColorScheme( + primary = brown_seed, + onPrimary = brown_md_theme_light_onPrimary, + primaryContainer = brown_md_theme_light_primaryContainer, + onPrimaryContainer = brown_md_theme_light_onPrimaryContainer, + secondary = brown_md_theme_light_secondary, + onSecondary = brown_md_theme_light_onSecondary, + secondaryContainer = brown_md_theme_light_secondaryContainer, + onSecondaryContainer = brown_md_theme_light_onSecondaryContainer, + tertiary = brown_md_theme_light_tertiary, + onTertiary = brown_md_theme_light_onTertiary, + tertiaryContainer = brown_md_theme_light_tertiaryContainer, + onTertiaryContainer = brown_md_theme_light_onTertiaryContainer, + error = brown_md_theme_light_error, + errorContainer = brown_md_theme_light_errorContainer, + onError = brown_md_theme_light_onError, + onErrorContainer = brown_md_theme_light_onErrorContainer, + background = brown_md_theme_light_background, + onBackground = brown_md_theme_light_onBackground, + outline = brown_md_theme_light_outline, + inverseOnSurface = brown_md_theme_light_inverseOnSurface, + inverseSurface = brown_md_theme_light_inverseSurface, + inversePrimary = brown_md_theme_light_inversePrimary, + surfaceTint = brown_md_theme_light_surfaceTint, + outlineVariant = brown_md_theme_light_outlineVariant, + scrim = brown_md_theme_light_scrim, + surface = brown_md_theme_light_surface, + onSurface = brown_md_theme_light_onSurface, + surfaceVariant = brown_md_theme_light_surfaceVariant, + onSurfaceVariant = brown_md_theme_light_onSurfaceVariant, + ) + else + darkColorScheme( + primary = brown_md_theme_dark_primary, + onPrimary = brown_md_theme_dark_onPrimary, + primaryContainer = brown_md_theme_dark_primaryContainer, + onPrimaryContainer = brown_md_theme_dark_onPrimaryContainer, + secondary = brown_md_theme_dark_secondary, + onSecondary = brown_md_theme_dark_onSecondary, + secondaryContainer = brown_md_theme_dark_secondaryContainer, + onSecondaryContainer = brown_md_theme_dark_onSecondaryContainer, + tertiary = brown_md_theme_dark_tertiary, + onTertiary = brown_md_theme_dark_onTertiary, + tertiaryContainer = brown_md_theme_dark_tertiaryContainer, + onTertiaryContainer = brown_md_theme_dark_onTertiaryContainer, + error = brown_md_theme_dark_error, + errorContainer = brown_md_theme_dark_errorContainer, + onError = brown_md_theme_dark_onError, + onErrorContainer = brown_md_theme_dark_onErrorContainer, + background = brown_md_theme_dark_background, + onBackground = brown_md_theme_dark_onBackground, + outline = brown_md_theme_dark_outline, + inverseOnSurface = brown_md_theme_dark_inverseOnSurface, + inverseSurface = brown_md_theme_dark_inverseSurface, + inversePrimary = brown_md_theme_dark_inversePrimary, + surfaceTint = brown_md_theme_dark_surfaceTint, + outlineVariant = brown_md_theme_dark_outlineVariant, + scrim = brown_md_theme_dark_scrim, + surface = brown_md_theme_dark_surface, + onSurface = brown_md_theme_dark_onSurface, + surfaceVariant = brown_md_theme_dark_surfaceVariant, + onSurfaceVariant = brown_md_theme_dark_onSurfaceVariant, + ) + +/** + * 灰色 + */ +@Composable +fun grayTheme( + darkTheme: Boolean +): ColorScheme = + if (!darkTheme) + lightColorScheme( + primary = gray_seed, + onPrimary = gray_md_theme_light_onPrimary, + primaryContainer = gray_md_theme_light_primaryContainer, + onPrimaryContainer = gray_md_theme_light_onPrimaryContainer, + secondary = gray_md_theme_light_secondary, + onSecondary = gray_md_theme_light_onSecondary, + secondaryContainer = gray_md_theme_light_secondaryContainer, + onSecondaryContainer = gray_md_theme_light_onSecondaryContainer, + tertiary = gray_md_theme_light_tertiary, + onTertiary = gray_md_theme_light_onTertiary, + tertiaryContainer = gray_md_theme_light_tertiaryContainer, + onTertiaryContainer = gray_md_theme_light_onTertiaryContainer, + error = gray_md_theme_light_error, + errorContainer = gray_md_theme_light_errorContainer, + onError = gray_md_theme_light_onError, + onErrorContainer = gray_md_theme_light_onErrorContainer, + background = gray_md_theme_light_background, + onBackground = gray_md_theme_light_onBackground, + outline = gray_md_theme_light_outline, + inverseOnSurface = gray_md_theme_light_inverseOnSurface, + inverseSurface = gray_md_theme_light_inverseSurface, + inversePrimary = gray_md_theme_light_inversePrimary, + surfaceTint = gray_md_theme_light_surfaceTint, + outlineVariant = gray_md_theme_light_outlineVariant, + scrim = gray_md_theme_light_scrim, + surface = gray_md_theme_light_surface, + onSurface = gray_md_theme_light_onSurface, + surfaceVariant = gray_md_theme_light_surfaceVariant, + onSurfaceVariant = gray_md_theme_light_onSurfaceVariant, + ) + else + darkColorScheme( + primary = gray_md_theme_dark_primary, + onPrimary = gray_md_theme_dark_onPrimary, + primaryContainer = gray_md_theme_dark_primaryContainer, + onPrimaryContainer = gray_md_theme_dark_onPrimaryContainer, + secondary = gray_md_theme_dark_secondary, + onSecondary = gray_md_theme_dark_onSecondary, + secondaryContainer = gray_md_theme_dark_secondaryContainer, + onSecondaryContainer = gray_md_theme_dark_onSecondaryContainer, + tertiary = gray_md_theme_dark_tertiary, + onTertiary = gray_md_theme_dark_onTertiary, + tertiaryContainer = gray_md_theme_dark_tertiaryContainer, + onTertiaryContainer = gray_md_theme_dark_onTertiaryContainer, + error = gray_md_theme_dark_error, + errorContainer = gray_md_theme_dark_errorContainer, + onError = gray_md_theme_dark_onError, + onErrorContainer = gray_md_theme_dark_onErrorContainer, + background = gray_md_theme_dark_background, + onBackground = gray_md_theme_dark_onBackground, + outline = gray_md_theme_dark_outline, + inverseOnSurface = gray_md_theme_dark_inverseOnSurface, + inverseSurface = gray_md_theme_dark_inverseSurface, + inversePrimary = gray_md_theme_dark_inversePrimary, + surfaceTint = gray_md_theme_dark_surfaceTint, + outlineVariant = gray_md_theme_dark_outlineVariant, + scrim = gray_md_theme_dark_scrim, + surface = gray_md_theme_dark_surface, + onSurface = gray_md_theme_dark_onSurface, + surfaceVariant = gray_md_theme_dark_surfaceVariant, + onSurfaceVariant = gray_md_theme_dark_onSurfaceVariant, + ) + + +/** + * 主题颜色状态管理 + */ +@Composable +fun themeAnimation(targetTheme: ColorScheme): ColorScheme { + //动画时长 + val durationMillis = 600 + //插值器 + val animationSpec = TweenSpec(durationMillis = durationMillis, easing = FastOutLinearInEasing) + + val primary by animateColorAsState( + targetValue = targetTheme.primary, animationSpec, label = "primary" + ) + val onPrimary by animateColorAsState( + targetValue = targetTheme.onPrimary, animationSpec, label = "onPrimary" + ) + val primaryContainer by animateColorAsState( + targetValue = targetTheme.primaryContainer, animationSpec, label = "primaryContainer" + ) + val onPrimaryContainer by animateColorAsState( + targetValue = targetTheme.onPrimaryContainer, animationSpec, label = "onPrimaryContainer" + ) + val secondary by animateColorAsState( + targetValue = targetTheme.secondary, animationSpec, label = "secondary" + ) + val onSecondary by animateColorAsState( + targetValue = targetTheme.onSecondary, animationSpec, label = "onSecondary" + ) + val secondaryContainer by animateColorAsState( + targetValue = targetTheme.secondaryContainer, animationSpec, label = "secondaryContainer" + ) + val onSecondaryContainer by animateColorAsState( + targetValue = targetTheme.onSecondaryContainer, animationSpec, label = "onSecondaryContainer" + ) + val tertiary by animateColorAsState( + targetValue = targetTheme.tertiary, animationSpec, label = "tertiary" + ) + val onTertiary by animateColorAsState( + targetValue = targetTheme.onTertiary, animationSpec, label = "onTertiary" + ) + val tertiaryContainer by animateColorAsState( + targetValue = targetTheme.tertiaryContainer, animationSpec, label = "tertiaryContainer" + ) + val onTertiaryContainer by animateColorAsState( + targetValue = targetTheme.onTertiaryContainer, animationSpec, label = "onTertiaryContainer" + ) + val error by animateColorAsState( + targetValue = targetTheme.error, animationSpec, label = "error" + ) + val errorContainer by animateColorAsState( + targetValue = targetTheme.errorContainer, animationSpec, label = "errorContainer" + ) + val onError by animateColorAsState( + targetValue = targetTheme.onError, animationSpec, label = "onError" + ) + val onErrorContainer by animateColorAsState( + targetValue = targetTheme.onErrorContainer, animationSpec, label = "onErrorContainer" + ) + val background by animateColorAsState( + targetValue = targetTheme.background, animationSpec, label = "background" + ) + val onBackground by animateColorAsState( + targetValue = targetTheme.onBackground, animationSpec, label = "onBackground" + ) + val outline by animateColorAsState( + targetValue = targetTheme.outline, animationSpec, label = "outline" + ) + val inverseOnSurface by animateColorAsState( + targetValue = targetTheme.inverseOnSurface, animationSpec, label = "inverseOnSurface" + ) + val inverseSurface by animateColorAsState( + targetValue = targetTheme.inverseSurface, animationSpec, label = "inverseSurface" + ) + val inversePrimary by animateColorAsState( + targetValue = targetTheme.inversePrimary, animationSpec, label = "inversePrimary" + ) + val surfaceTint by animateColorAsState( + targetValue = targetTheme.surfaceTint, animationSpec, label = "surfaceTint" + ) + val outlineVariant by animateColorAsState( + targetValue = targetTheme.outlineVariant, animationSpec, label = "outlineVariant" + ) + val scrim by animateColorAsState( + targetValue = targetTheme.scrim, animationSpec, label = "scrim" + ) + val surface by animateColorAsState( + targetValue = targetTheme.surface, animationSpec, label = "surface" + ) + val onSurface by animateColorAsState( + targetValue = targetTheme.onSurface, animationSpec, label = "onSurface" + ) + val surfaceVariant by animateColorAsState( + targetValue = targetTheme.surfaceVariant, animationSpec, label = "surfaceVariant" + ) + val onSurfaceVariant by animateColorAsState( + targetValue = targetTheme.onSurfaceVariant, animationSpec, label = "onSurfaceVariant" + ) + + return targetTheme.copy( + primary = primary, + onPrimary = onPrimary, + primaryContainer = primaryContainer, + onPrimaryContainer = onPrimaryContainer, + secondary = secondary, + onSecondary = onSecondary, + secondaryContainer = secondaryContainer, + onSecondaryContainer = onSecondaryContainer, + tertiary = tertiary, + onTertiary = onTertiary, + tertiaryContainer = tertiaryContainer, + onTertiaryContainer = onTertiaryContainer, + error = error, + errorContainer = errorContainer, + onError = onError, + onErrorContainer = onErrorContainer, + background = background, + onBackground = onBackground, + outline = outline, + inverseOnSurface = inverseOnSurface, + inverseSurface = inverseSurface, + inversePrimary = inversePrimary, + surfaceTint = surfaceTint, + outlineVariant = outlineVariant, + scrim = scrim, + surface = surface, + onSurface = onSurface, + surfaceVariant = surfaceVariant, + onSurfaceVariant = onSurfaceVariant, + ) +} \ No newline at end of file diff --git a/app/src/main/java/com/github/jing332/tts_dict_editor/ui/theme/Color2.kt b/app/src/main/java/com/github/jing332/tts_dict_editor/ui/theme/Color2.kt new file mode 100644 index 0000000..b6549cb --- /dev/null +++ b/app/src/main/java/com/github/jing332/tts_dict_editor/ui/theme/Color2.kt @@ -0,0 +1,642 @@ +package com.github.jing332.tts_dict_editor.ui.theme + +import androidx.compose.ui.graphics.Color +//默认 +val bean_green_md_theme_light_primary = Color(0xFF376A20) +val bean_green_md_theme_light_onPrimary = Color(0xFFFFFFFF) +val bean_green_md_theme_light_primaryContainer = Color(0xFFB7F398) +val bean_green_md_theme_light_onPrimaryContainer = Color(0xFF062100) +val bean_green_md_theme_light_secondary = Color(0xFF55624C) +val bean_green_md_theme_light_onSecondary = Color(0xFFFFFFFF) +val bean_green_md_theme_light_secondaryContainer = Color(0xFFD8E7CB) +val bean_green_md_theme_light_onSecondaryContainer = Color(0xFF131F0D) +val bean_green_md_theme_light_tertiary = Color(0xFF386667) +val bean_green_md_theme_light_onTertiary = Color(0xFFFFFFFF) +val bean_green_md_theme_light_tertiaryContainer = Color(0xFFBBEBEC) +val bean_green_md_theme_light_onTertiaryContainer = Color(0xFF002021) +val bean_green_md_theme_light_error = Color(0xFFBA1A1A) +val bean_green_md_theme_light_errorContainer = Color(0xFFFFDAD6) +val bean_green_md_theme_light_onError = Color(0xFFFFFFFF) +val bean_green_md_theme_light_onErrorContainer = Color(0xFF410002) +val bean_green_md_theme_light_background = Color(0xFFFDFDF6) +val bean_green_md_theme_light_onBackground = Color(0xFF1A1C18) +val bean_green_md_theme_light_outline = Color(0xFF73796D) +val bean_green_md_theme_light_inverseOnSurface = Color(0xFFF1F1EA) +val bean_green_md_theme_light_inverseSurface = Color(0xFF2F312D) +val bean_green_md_theme_light_inversePrimary = Color(0xFF9CD67E) +val bean_green_md_theme_light_surfaceTint = Color(0xFF376A20) +val bean_green_md_theme_light_outlineVariant = Color(0xFFC3C8BB) +val bean_green_md_theme_light_scrim = Color(0xFF000000) +val bean_green_md_theme_light_surface = Color(0xFFFAFAF3) +val bean_green_md_theme_light_onSurface = Color(0xFF1A1C18) +val bean_green_md_theme_light_surfaceVariant = Color(0xFFDFE4D7) +val bean_green_md_theme_light_onSurfaceVariant = Color(0xFF43483E) + +val bean_green_md_theme_dark_primary = Color(0xFF9CD67E) +val bean_green_md_theme_dark_onPrimary = Color(0xFF0F3900) +val bean_green_md_theme_dark_primaryContainer = Color(0xFF1F5108) +val bean_green_md_theme_dark_onPrimaryContainer = Color(0xFFB7F398) +val bean_green_md_theme_dark_secondary = Color(0xFFBCCBB0) +val bean_green_md_theme_dark_onSecondary = Color(0xFF283421) +val bean_green_md_theme_dark_secondaryContainer = Color(0xFF3E4A36) +val bean_green_md_theme_dark_onSecondaryContainer = Color(0xFFD8E7CB) +val bean_green_md_theme_dark_tertiary = Color(0xFFA0CFD0) +val bean_green_md_theme_dark_onTertiary = Color(0xFF003738) +val bean_green_md_theme_dark_tertiaryContainer = Color(0xFF1E4E4F) +val bean_green_md_theme_dark_onTertiaryContainer = Color(0xFFBBEBEC) +val bean_green_md_theme_dark_error = Color(0xFFFFB4AB) +val bean_green_md_theme_dark_errorContainer = Color(0xFF93000A) +val bean_green_md_theme_dark_onError = Color(0xFF690005) +val bean_green_md_theme_dark_onErrorContainer = Color(0xFFFFDAD6) +val bean_green_md_theme_dark_background = Color(0xFF1A1C18) +val bean_green_md_theme_dark_onBackground = Color(0xFFE3E3DC) +val bean_green_md_theme_dark_outline = Color(0xFF8D9287) +val bean_green_md_theme_dark_inverseOnSurface = Color(0xFF1A1C18) +val bean_green_md_theme_dark_inverseSurface = Color(0xFFE3E3DC) +val bean_green_md_theme_dark_inversePrimary = Color(0xFF376A20) +val bean_green_md_theme_dark_surfaceTint = Color(0xFF9CD67E) +val bean_green_md_theme_dark_outlineVariant = Color(0xFF43483E) +val bean_green_md_theme_dark_scrim = Color(0xFF000000) +val bean_green_md_theme_dark_surface = Color(0xFF121410) +val bean_green_md_theme_dark_onSurface = Color(0xFFC6C7C0) +val bean_green_md_theme_dark_surfaceVariant = Color(0xFF43483E) +val bean_green_md_theme_dark_onSurfaceVariant = Color(0xFFC3C8BB) + + +val bean_green_seed = Color(0xFF7B8B70) + +//蓝色 +val blue_md_theme_light_primary = Color(0xFF005AC1) +val blue_md_theme_light_onPrimary = Color(0xFFFFFFFF) +val blue_md_theme_light_primaryContainer = Color(0xFFD8E2FF) +val blue_md_theme_light_onPrimaryContainer = Color(0xFF001A41) +val blue_md_theme_light_secondary = Color(0xFF575E71) +val blue_md_theme_light_onSecondary = Color(0xFFFFFFFF) +val blue_md_theme_light_secondaryContainer = Color(0xFFDBE2F9) +val blue_md_theme_light_onSecondaryContainer = Color(0xFF141B2C) +val blue_md_theme_light_tertiary = Color(0xFF715573) +val blue_md_theme_light_onTertiary = Color(0xFFFFFFFF) +val blue_md_theme_light_tertiaryContainer = Color(0xFFFBD7FC) +val blue_md_theme_light_onTertiaryContainer = Color(0xFF29132D) +val blue_md_theme_light_error = Color(0xFFBA1A1A) +val blue_md_theme_light_errorContainer = Color(0xFFFFDAD6) +val blue_md_theme_light_onError = Color(0xFFFFFFFF) +val blue_md_theme_light_onErrorContainer = Color(0xFF410002) +val blue_md_theme_light_background = Color(0xFFFEFBFF) +val blue_md_theme_light_onBackground = Color(0xFF1B1B1F) +val blue_md_theme_light_outline = Color(0xFF74777F) +val blue_md_theme_light_inverseOnSurface = Color(0xFFF2F0F4) +val blue_md_theme_light_inverseSurface = Color(0xFF303033) +val blue_md_theme_light_inversePrimary = Color(0xFFADC6FF) +val blue_md_theme_light_surfaceTint = Color(0xFF005AC1) +val blue_md_theme_light_outlineVariant = Color(0xFFC4C6D0) +val blue_md_theme_light_scrim = Color(0xFF000000) +val blue_md_theme_light_surface = Color(0xFFFAF9FD) +val blue_md_theme_light_onSurface = Color(0xFF1B1B1F) +val blue_md_theme_light_surfaceVariant = Color(0xFFE1E2EC) +val blue_md_theme_light_onSurfaceVariant = Color(0xFF44474F) + +val blue_md_theme_dark_primary = Color(0xFFADC6FF) +val blue_md_theme_dark_onPrimary = Color(0xFF002E69) +val blue_md_theme_dark_primaryContainer = Color(0xFF004494) +val blue_md_theme_dark_onPrimaryContainer = Color(0xFFD8E2FF) +val blue_md_theme_dark_secondary = Color(0xFFBFC6DC) +val blue_md_theme_dark_onSecondary = Color(0xFF293041) +val blue_md_theme_dark_secondaryContainer = Color(0xFF3F4759) +val blue_md_theme_dark_onSecondaryContainer = Color(0xFFDBE2F9) +val blue_md_theme_dark_tertiary = Color(0xFFDEBCDF) +val blue_md_theme_dark_onTertiary = Color(0xFF402843) +val blue_md_theme_dark_tertiaryContainer = Color(0xFF583E5B) +val blue_md_theme_dark_onTertiaryContainer = Color(0xFFFBD7FC) +val blue_md_theme_dark_error = Color(0xFFFFB4AB) +val blue_md_theme_dark_errorContainer = Color(0xFF93000A) +val blue_md_theme_dark_onError = Color(0xFF690005) +val blue_md_theme_dark_onErrorContainer = Color(0xFFFFDAD6) +val blue_md_theme_dark_background = Color(0xFF1B1B1F) +val blue_md_theme_dark_onBackground = Color(0xFFE3E2E6) +val blue_md_theme_dark_outline = Color(0xFF8E9099) +val blue_md_theme_dark_inverseOnSurface = Color(0xFF1B1B1F) +val blue_md_theme_dark_inverseSurface = Color(0xFFE3E2E6) +val blue_md_theme_dark_inversePrimary = Color(0xFF005AC1) +val blue_md_theme_dark_surfaceTint = Color(0xFFADC6FF) +val blue_md_theme_dark_outlineVariant = Color(0xFF44474F) +val blue_md_theme_dark_scrim = Color(0xFF000000) +val blue_md_theme_dark_surface = Color(0xFF121316) +val blue_md_theme_dark_onSurface = Color(0xFFC7C6CA) +val blue_md_theme_dark_surfaceVariant = Color(0xFF44474F) +val blue_md_theme_dark_onSurfaceVariant = Color(0xFFC4C6D0) + +val blue_seed = Color(0xFF4285F4) + +//GREEN +val green_md_theme_light_primary = Color(0xFF006D3A) +val green_md_theme_light_onPrimary = Color(0xFFFFFFFF) +val green_md_theme_light_primaryContainer = Color(0xFF82FAAB) +val green_md_theme_light_onPrimaryContainer = Color(0xFF00210E) +val green_md_theme_light_secondary = Color(0xFF4F6353) +val green_md_theme_light_onSecondary = Color(0xFFFFFFFF) +val green_md_theme_light_secondaryContainer = Color(0xFFD2E8D4) +val green_md_theme_light_onSecondaryContainer = Color(0xFF0D1F13) +val green_md_theme_light_tertiary = Color(0xFF3A646F) +val green_md_theme_light_onTertiary = Color(0xFFFFFFFF) +val green_md_theme_light_tertiaryContainer = Color(0xFFBEEAF6) +val green_md_theme_light_onTertiaryContainer = Color(0xFF001F26) +val green_md_theme_light_error = Color(0xFFBA1A1A) +val green_md_theme_light_errorContainer = Color(0xFFFFDAD6) +val green_md_theme_light_onError = Color(0xFFFFFFFF) +val green_md_theme_light_onErrorContainer = Color(0xFF410002) +val green_md_theme_light_background = Color(0xFFFBFDF8) +val green_md_theme_light_onBackground = Color(0xFF191C19) +val green_md_theme_light_outline = Color(0xFF717971) +val green_md_theme_light_inverseOnSurface = Color(0xFFF0F1EC) +val green_md_theme_light_inverseSurface = Color(0xFF2E312E) +val green_md_theme_light_inversePrimary = Color(0xFF65DD91) +val green_md_theme_light_surfaceTint = Color(0xFF006D3A) +val green_md_theme_light_outlineVariant = Color(0xFFC1C9BF) +val green_md_theme_light_scrim = Color(0xFF000000) +val green_md_theme_light_surface = Color(0xFFF8FAF5) +val green_md_theme_light_onSurface = Color(0xFF191C19) +val green_md_theme_light_surfaceVariant = Color(0xFFDDE5DB) +val green_md_theme_light_onSurfaceVariant = Color(0xFF414941) + +val green_md_theme_dark_primary = Color(0xFF65DD91) +val green_md_theme_dark_onPrimary = Color(0xFF00391C) +val green_md_theme_dark_primaryContainer = Color(0xFF00522B) +val green_md_theme_dark_onPrimaryContainer = Color(0xFF82FAAB) +val green_md_theme_dark_secondary = Color(0xFFB6CCB8) +val green_md_theme_dark_onSecondary = Color(0xFF223527) +val green_md_theme_dark_secondaryContainer = Color(0xFF384B3C) +val green_md_theme_dark_onSecondaryContainer = Color(0xFFD2E8D4) +val green_md_theme_dark_tertiary = Color(0xFFA2CEDA) +val green_md_theme_dark_onTertiary = Color(0xFF02363F) +val green_md_theme_dark_tertiaryContainer = Color(0xFF214C57) +val green_md_theme_dark_onTertiaryContainer = Color(0xFFBEEAF6) +val green_md_theme_dark_error = Color(0xFFFFB4AB) +val green_md_theme_dark_errorContainer = Color(0xFF93000A) +val green_md_theme_dark_onError = Color(0xFF690005) +val green_md_theme_dark_onErrorContainer = Color(0xFFFFDAD6) +val green_md_theme_dark_background = Color(0xFF191C19) +val green_md_theme_dark_onBackground = Color(0xFFE1E3DE) +val green_md_theme_dark_outline = Color(0xFF8B938A) +val green_md_theme_dark_inverseOnSurface = Color(0xFF191C19) +val green_md_theme_dark_inverseSurface = Color(0xFFE1E3DE) +val green_md_theme_dark_inversePrimary = Color(0xFF006D3A) +val green_md_theme_dark_surfaceTint = Color(0xFF65DD91) +val green_md_theme_dark_outlineVariant = Color(0xFF414941) +val green_md_theme_dark_scrim = Color(0xFF000000) +val green_md_theme_dark_surface = Color(0xFF111411) +val green_md_theme_dark_onSurface = Color(0xFFC5C7C2) +val green_md_theme_dark_surfaceVariant = Color(0xFF414941) +val green_md_theme_dark_onSurfaceVariant = Color(0xFFC1C9BF) + + +val green_seed = Color(0xFF109D58) + +// RED +val red_md_theme_light_primary = Color(0xFFB4271F) +val red_md_theme_light_onPrimary = Color(0xFFFFFFFF) +val red_md_theme_light_primaryContainer = Color(0xFFFFDAD5) +val red_md_theme_light_onPrimaryContainer = Color(0xFF410001) +val red_md_theme_light_secondary = Color(0xFF775652) +val red_md_theme_light_onSecondary = Color(0xFFFFFFFF) +val red_md_theme_light_secondaryContainer = Color(0xFFFFDAD5) +val red_md_theme_light_onSecondaryContainer = Color(0xFF2C1512) +val red_md_theme_light_tertiary = Color(0xFF705C2E) +val red_md_theme_light_onTertiary = Color(0xFFFFFFFF) +val red_md_theme_light_tertiaryContainer = Color(0xFFFCDFA6) +val red_md_theme_light_onTertiaryContainer = Color(0xFF261A00) +val red_md_theme_light_error = Color(0xFFBA1A1A) +val red_md_theme_light_errorContainer = Color(0xFFFFDAD6) +val red_md_theme_light_onError = Color(0xFFFFFFFF) +val red_md_theme_light_onErrorContainer = Color(0xFF410002) +val red_md_theme_light_background = Color(0xFFFFFBFF) +val red_md_theme_light_onBackground = Color(0xFF201A19) +val red_md_theme_light_outline = Color(0xFF857370) +val red_md_theme_light_inverseOnSurface = Color(0xFFFBEEEC) +val red_md_theme_light_inverseSurface = Color(0xFF362F2E) +val red_md_theme_light_inversePrimary = Color(0xFFFFB4A9) +val red_md_theme_light_surfaceTint = Color(0xFFB4271F) +val red_md_theme_light_outlineVariant = Color(0xFFD8C2BE) +val red_md_theme_light_scrim = Color(0xFF000000) +val red_md_theme_light_surface = Color(0xFFFFF8F7) +val red_md_theme_light_onSurface = Color(0xFF201A19) +val red_md_theme_light_surfaceVariant = Color(0xFFF5DDDA) +val red_md_theme_light_onSurfaceVariant = Color(0xFF534341) + +val red_md_theme_dark_primary = Color(0xFFFFB4A9) +val red_md_theme_dark_onPrimary = Color(0xFF690002) +val red_md_theme_dark_primaryContainer = Color(0xFF910809) +val red_md_theme_dark_onPrimaryContainer = Color(0xFFFFDAD5) +val red_md_theme_dark_secondary = Color(0xFFE7BDB7) +val red_md_theme_dark_onSecondary = Color(0xFF442926) +val red_md_theme_dark_secondaryContainer = Color(0xFF5D3F3B) +val red_md_theme_dark_onSecondaryContainer = Color(0xFFFFDAD5) +val red_md_theme_dark_tertiary = Color(0xFFDFC38C) +val red_md_theme_dark_onTertiary = Color(0xFF3E2E04) +val red_md_theme_dark_tertiaryContainer = Color(0xFF574419) +val red_md_theme_dark_onTertiaryContainer = Color(0xFFFCDFA6) +val red_md_theme_dark_error = Color(0xFFFFB4AB) +val red_md_theme_dark_errorContainer = Color(0xFF93000A) +val red_md_theme_dark_onError = Color(0xFF690005) +val red_md_theme_dark_onErrorContainer = Color(0xFFFFDAD6) +val red_md_theme_dark_background = Color(0xFF201A19) +val red_md_theme_dark_onBackground = Color(0xFFEDE0DE) +val red_md_theme_dark_outline = Color(0xFFA08C89) +val red_md_theme_dark_inverseOnSurface = Color(0xFF201A19) +val red_md_theme_dark_inverseSurface = Color(0xFFEDE0DE) +val red_md_theme_dark_inversePrimary = Color(0xFFB4271F) +val red_md_theme_dark_surfaceTint = Color(0xFFFFB4A9) +val red_md_theme_dark_outlineVariant = Color(0xFF534341) +val red_md_theme_dark_scrim = Color(0xFF000000) +val red_md_theme_dark_surface = Color(0xFF181211) +val red_md_theme_dark_onSurface = Color(0xFFD0C4C2) +val red_md_theme_dark_surfaceVariant = Color(0xFF534341) +val red_md_theme_dark_onSurfaceVariant = Color(0xFFD8C2BE) + + +val red_seed = Color(0xFFDC4437) + + +// PINK +val pink_md_theme_light_primary = Color(0xFFA73258) +val pink_md_theme_light_onPrimary = Color(0xFFFFFFFF) +val pink_md_theme_light_primaryContainer = Color(0xFFFFD9E0) +val pink_md_theme_light_onPrimaryContainer = Color(0xFF3F0018) +val pink_md_theme_light_secondary = Color(0xFF75565C) +val pink_md_theme_light_onSecondary = Color(0xFFFFFFFF) +val pink_md_theme_light_secondaryContainer = Color(0xFFFFD9E0) +val pink_md_theme_light_onSecondaryContainer = Color(0xFF2B151A) +val pink_md_theme_light_tertiary = Color(0xFF7B5733) +val pink_md_theme_light_onTertiary = Color(0xFFFFFFFF) +val pink_md_theme_light_tertiaryContainer = Color(0xFFFFDCBE) +val pink_md_theme_light_onTertiaryContainer = Color(0xFF2C1600) +val pink_md_theme_light_error = Color(0xFFBA1A1A) +val pink_md_theme_light_errorContainer = Color(0xFFFFDAD6) +val pink_md_theme_light_onError = Color(0xFFFFFFFF) +val pink_md_theme_light_onErrorContainer = Color(0xFF410002) +val pink_md_theme_light_background = Color(0xFFFFFBFF) +val pink_md_theme_light_onBackground = Color(0xFF201A1B) +val pink_md_theme_light_outline = Color(0xFF847376) +val pink_md_theme_light_inverseOnSurface = Color(0xFFFAEEEF) +val pink_md_theme_light_inverseSurface = Color(0xFF352F30) +val pink_md_theme_light_inversePrimary = Color(0xFFFFB1C2) +val pink_md_theme_light_surfaceTint = Color(0xFFA73258) +val pink_md_theme_light_outlineVariant = Color(0xFFD6C2C4) +val pink_md_theme_light_scrim = Color(0xFF000000) +val pink_md_theme_light_surface = Color(0xFFFFF8F7) +val pink_md_theme_light_onSurface = Color(0xFF201A1B) +val pink_md_theme_light_surfaceVariant = Color(0xFFF3DDE0) +val pink_md_theme_light_onSurfaceVariant = Color(0xFF514346) + +val pink_md_theme_dark_primary = Color(0xFFFFB1C2) +val pink_md_theme_dark_onPrimary = Color(0xFF66002B) +val pink_md_theme_dark_primaryContainer = Color(0xFF881841) +val pink_md_theme_dark_onPrimaryContainer = Color(0xFFFFD9E0) +val pink_md_theme_dark_secondary = Color(0xFFE4BDC4) +val pink_md_theme_dark_onSecondary = Color(0xFF43292F) +val pink_md_theme_dark_secondaryContainer = Color(0xFF5B3F45) +val pink_md_theme_dark_onSecondaryContainer = Color(0xFFFFD9E0) +val pink_md_theme_dark_tertiary = Color(0xFFEDBE91) +val pink_md_theme_dark_onTertiary = Color(0xFF462A09) +val pink_md_theme_dark_tertiaryContainer = Color(0xFF60401E) +val pink_md_theme_dark_onTertiaryContainer = Color(0xFFFFDCBE) +val pink_md_theme_dark_error = Color(0xFFFFB4AB) +val pink_md_theme_dark_errorContainer = Color(0xFF93000A) +val pink_md_theme_dark_onError = Color(0xFF690005) +val pink_md_theme_dark_onErrorContainer = Color(0xFFFFDAD6) +val pink_md_theme_dark_background = Color(0xFF201A1B) +val pink_md_theme_dark_onBackground = Color(0xFFECE0E1) +val pink_md_theme_dark_outline = Color(0xFF9E8C8F) +val pink_md_theme_dark_inverseOnSurface = Color(0xFF201A1B) +val pink_md_theme_dark_inverseSurface = Color(0xFFECE0E1) +val pink_md_theme_dark_inversePrimary = Color(0xFFA73258) +val pink_md_theme_dark_surfaceTint = Color(0xFFFFB1C2) +val pink_md_theme_dark_outlineVariant = Color(0xFF514346) +val pink_md_theme_dark_scrim = Color(0xFF000000) +val pink_md_theme_dark_surface = Color(0xFF171213) +val pink_md_theme_dark_onSurface = Color(0xFFCFC4C5) +val pink_md_theme_dark_surfaceVariant = Color(0xFF514346) +val pink_md_theme_dark_onSurfaceVariant = Color(0xFFD6C2C4) + + +val pink_seed = Color(0xFFFA7298) + +// CYAN +val cyan_md_theme_light_primary = Color(0xFF006B60) +val cyan_md_theme_light_onPrimary = Color(0xFFFFFFFF) +val cyan_md_theme_light_primaryContainer = Color(0xFF74F8E4) +val cyan_md_theme_light_onPrimaryContainer = Color(0xFF00201C) +val cyan_md_theme_light_secondary = Color(0xFF4A635E) +val cyan_md_theme_light_onSecondary = Color(0xFFFFFFFF) +val cyan_md_theme_light_secondaryContainer = Color(0xFFCCE8E2) +val cyan_md_theme_light_onSecondaryContainer = Color(0xFF05201C) +val cyan_md_theme_light_tertiary = Color(0xFF456179) +val cyan_md_theme_light_onTertiary = Color(0xFFFFFFFF) +val cyan_md_theme_light_tertiaryContainer = Color(0xFFCCE5FF) +val cyan_md_theme_light_onTertiaryContainer = Color(0xFF001E31) +val cyan_md_theme_light_error = Color(0xFFBA1A1A) +val cyan_md_theme_light_errorContainer = Color(0xFFFFDAD6) +val cyan_md_theme_light_onError = Color(0xFFFFFFFF) +val cyan_md_theme_light_onErrorContainer = Color(0xFF410002) +val cyan_md_theme_light_background = Color(0xFFFAFDFB) +val cyan_md_theme_light_onBackground = Color(0xFF191C1B) +val cyan_md_theme_light_outline = Color(0xFF6F7976) +val cyan_md_theme_light_inverseOnSurface = Color(0xFFEFF1EF) +val cyan_md_theme_light_inverseSurface = Color(0xFF2D3130) +val cyan_md_theme_light_inversePrimary = Color(0xFF54DBC8) +val cyan_md_theme_light_surfaceTint = Color(0xFF006B60) +val cyan_md_theme_light_outlineVariant = Color(0xFFBEC9C5) +val cyan_md_theme_light_scrim = Color(0xFF000000) +val cyan_md_theme_light_surface = Color(0xFFF7FAF8) +val cyan_md_theme_light_onSurface = Color(0xFF191C1B) +val cyan_md_theme_light_surfaceVariant = Color(0xFFDAE5E1) +val cyan_md_theme_light_onSurfaceVariant = Color(0xFF3F4946) + +val cyan_md_theme_dark_primary = Color(0xFF54DBC8) +val cyan_md_theme_dark_onPrimary = Color(0xFF003731) +val cyan_md_theme_dark_primaryContainer = Color(0xFF005048) +val cyan_md_theme_dark_onPrimaryContainer = Color(0xFF74F8E4) +val cyan_md_theme_dark_secondary = Color(0xFFB1CCC6) +val cyan_md_theme_dark_onSecondary = Color(0xFF1C3531) +val cyan_md_theme_dark_secondaryContainer = Color(0xFF334B47) +val cyan_md_theme_dark_onSecondaryContainer = Color(0xFFCCE8E2) +val cyan_md_theme_dark_tertiary = Color(0xFFADCAE5) +val cyan_md_theme_dark_onTertiary = Color(0xFF143349) +val cyan_md_theme_dark_tertiaryContainer = Color(0xFF2D4960) +val cyan_md_theme_dark_onTertiaryContainer = Color(0xFFCCE5FF) +val cyan_md_theme_dark_error = Color(0xFFFFB4AB) +val cyan_md_theme_dark_errorContainer = Color(0xFF93000A) +val cyan_md_theme_dark_onError = Color(0xFF690005) +val cyan_md_theme_dark_onErrorContainer = Color(0xFFFFDAD6) +val cyan_md_theme_dark_background = Color(0xFF191C1B) +val cyan_md_theme_dark_onBackground = Color(0xFFE0E3E1) +val cyan_md_theme_dark_outline = Color(0xFF899390) +val cyan_md_theme_dark_inverseOnSurface = Color(0xFF191C1B) +val cyan_md_theme_dark_inverseSurface = Color(0xFFE0E3E1) +val cyan_md_theme_dark_inversePrimary = Color(0xFF006B60) +val cyan_md_theme_dark_surfaceTint = Color(0xFF54DBC8) +val cyan_md_theme_dark_outlineVariant = Color(0xFF3F4946) +val cyan_md_theme_dark_scrim = Color(0xFF000000) +val cyan_md_theme_dark_surface = Color(0xFF101413) +val cyan_md_theme_dark_onSurface = Color(0xFFC4C7C5) +val cyan_md_theme_dark_surfaceVariant = Color(0xFF3F4946) +val cyan_md_theme_dark_onSurfaceVariant = Color(0xFFBEC9C5) + + +val cyan_seed = Color(0xFF009788) + +// ORANGE +val orange_md_theme_light_primary = Color(0xFF8B5000) +val orange_md_theme_light_onPrimary = Color(0xFFFFFFFF) +val orange_md_theme_light_primaryContainer = Color(0xFFFFDCBE) +val orange_md_theme_light_onPrimaryContainer = Color(0xFF2D1600) +val orange_md_theme_light_secondary = Color(0xFF735A42) +val orange_md_theme_light_onSecondary = Color(0xFFFFFFFF) +val orange_md_theme_light_secondaryContainer = Color(0xFFFFDCBE) +val orange_md_theme_light_onSecondaryContainer = Color(0xFF291806) +val orange_md_theme_light_tertiary = Color(0xFF586339) +val orange_md_theme_light_onTertiary = Color(0xFFFFFFFF) +val orange_md_theme_light_tertiaryContainer = Color(0xFFDCE8B4) +val orange_md_theme_light_onTertiaryContainer = Color(0xFF161E00) +val orange_md_theme_light_error = Color(0xFFBA1A1A) +val orange_md_theme_light_errorContainer = Color(0xFFFFDAD6) +val orange_md_theme_light_onError = Color(0xFFFFFFFF) +val orange_md_theme_light_onErrorContainer = Color(0xFF410002) +val orange_md_theme_light_background = Color(0xFFFFFBFF) +val orange_md_theme_light_onBackground = Color(0xFF201B16) +val orange_md_theme_light_outline = Color(0xFF837468) +val orange_md_theme_light_inverseOnSurface = Color(0xFFFAEFE7) +val orange_md_theme_light_inverseSurface = Color(0xFF352F2B) +val orange_md_theme_light_inversePrimary = Color(0xFFFFB871) +val orange_md_theme_light_surfaceTint = Color(0xFF8B5000) +val orange_md_theme_light_outlineVariant = Color(0xFFD5C3B5) +val orange_md_theme_light_scrim = Color(0xFF000000) +val orange_md_theme_light_surface = Color(0xFFFFF8F5) +val orange_md_theme_light_onSurface = Color(0xFF201B16) +val orange_md_theme_light_surfaceVariant = Color(0xFFF2DFD1) +val orange_md_theme_light_onSurfaceVariant = Color(0xFF51453A) + +val orange_md_theme_dark_primary = Color(0xFFFFB871) +val orange_md_theme_dark_onPrimary = Color(0xFF4A2800) +val orange_md_theme_dark_primaryContainer = Color(0xFF6A3C00) +val orange_md_theme_dark_onPrimaryContainer = Color(0xFFFFDCBE) +val orange_md_theme_dark_secondary = Color(0xFFE1C1A4) +val orange_md_theme_dark_onSecondary = Color(0xFF402C18) +val orange_md_theme_dark_secondaryContainer = Color(0xFF59422D) +val orange_md_theme_dark_onSecondaryContainer = Color(0xFFFFDCBE) +val orange_md_theme_dark_tertiary = Color(0xFFC0CC9A) +val orange_md_theme_dark_onTertiary = Color(0xFF2B3410) +val orange_md_theme_dark_tertiaryContainer = Color(0xFF414B24) +val orange_md_theme_dark_onTertiaryContainer = Color(0xFFDCE8B4) +val orange_md_theme_dark_error = Color(0xFFFFB4AB) +val orange_md_theme_dark_errorContainer = Color(0xFF93000A) +val orange_md_theme_dark_onError = Color(0xFF690005) +val orange_md_theme_dark_onErrorContainer = Color(0xFFFFDAD6) +val orange_md_theme_dark_background = Color(0xFF201B16) +val orange_md_theme_dark_onBackground = Color(0xFFEBE0D9) +val orange_md_theme_dark_outline = Color(0xFF9E8E81) +val orange_md_theme_dark_inverseOnSurface = Color(0xFF201B16) +val orange_md_theme_dark_inverseSurface = Color(0xFFEBE0D9) +val orange_md_theme_dark_inversePrimary = Color(0xFF8B5000) +val orange_md_theme_dark_surfaceTint = Color(0xFFFFB871) +val orange_md_theme_dark_outlineVariant = Color(0xFF51453A) +val orange_md_theme_dark_scrim = Color(0xFF000000) +val orange_md_theme_dark_surface = Color(0xFF17120F) +val orange_md_theme_dark_onSurface = Color(0xFFCFC5BE) +val orange_md_theme_dark_surfaceVariant = Color(0xFF51453A) +val orange_md_theme_dark_onSurfaceVariant = Color(0xFFD5C3B5) + + +val orange_seed = Color(0xFFFF9700) + +// PURPLE +val purple_md_theme_light_primary = Color(0xFF6F44BF) +val purple_md_theme_light_onPrimary = Color(0xFFFFFFFF) +val purple_md_theme_light_primaryContainer = Color(0xFFEBDDFF) +val purple_md_theme_light_onPrimaryContainer = Color(0xFF250059) +val purple_md_theme_light_secondary = Color(0xFF635B70) +val purple_md_theme_light_onSecondary = Color(0xFFFFFFFF) +val purple_md_theme_light_secondaryContainer = Color(0xFFE9DEF8) +val purple_md_theme_light_onSecondaryContainer = Color(0xFF1F182B) +val purple_md_theme_light_tertiary = Color(0xFF7E525E) +val purple_md_theme_light_onTertiary = Color(0xFFFFFFFF) +val purple_md_theme_light_tertiaryContainer = Color(0xFFFFD9E1) +val purple_md_theme_light_onTertiaryContainer = Color(0xFF31101B) +val purple_md_theme_light_error = Color(0xFFBA1A1A) +val purple_md_theme_light_errorContainer = Color(0xFFFFDAD6) +val purple_md_theme_light_onError = Color(0xFFFFFFFF) +val purple_md_theme_light_onErrorContainer = Color(0xFF410002) +val purple_md_theme_light_background = Color(0xFFFFFBFF) +val purple_md_theme_light_onBackground = Color(0xFF1D1B1E) +val purple_md_theme_light_outline = Color(0xFF7A757F) +val purple_md_theme_light_inverseOnSurface = Color(0xFFF5EFF4) +val purple_md_theme_light_inverseSurface = Color(0xFF323033) +val purple_md_theme_light_inversePrimary = Color(0xFFD3BBFF) +val purple_md_theme_light_surfaceTint = Color(0xFF6F44BF) +val purple_md_theme_light_outlineVariant = Color(0xFFCBC4CF) +val purple_md_theme_light_scrim = Color(0xFF000000) +val purple_md_theme_light_surface = Color(0xFFFDF8FD) +val purple_md_theme_light_onSurface = Color(0xFF1D1B1E) +val purple_md_theme_light_surfaceVariant = Color(0xFFE7E0EB) +val purple_md_theme_light_onSurfaceVariant = Color(0xFF49454E) + +val purple_md_theme_dark_primary = Color(0xFFD3BBFF) +val purple_md_theme_dark_onPrimary = Color(0xFF3F008D) +val purple_md_theme_dark_primaryContainer = Color(0xFF5628A6) +val purple_md_theme_dark_onPrimaryContainer = Color(0xFFEBDDFF) +val purple_md_theme_dark_secondary = Color(0xFFCDC2DB) +val purple_md_theme_dark_onSecondary = Color(0xFF342D40) +val purple_md_theme_dark_secondaryContainer = Color(0xFF4B4358) +val purple_md_theme_dark_onSecondaryContainer = Color(0xFFE9DEF8) +val purple_md_theme_dark_tertiary = Color(0xFFF0B7C5) +val purple_md_theme_dark_onTertiary = Color(0xFF4A2530) +val purple_md_theme_dark_tertiaryContainer = Color(0xFF643B46) +val purple_md_theme_dark_onTertiaryContainer = Color(0xFFFFD9E1) +val purple_md_theme_dark_error = Color(0xFFFFB4AB) +val purple_md_theme_dark_errorContainer = Color(0xFF93000A) +val purple_md_theme_dark_onError = Color(0xFF690005) +val purple_md_theme_dark_onErrorContainer = Color(0xFFFFDAD6) +val purple_md_theme_dark_background = Color(0xFF1D1B1E) +val purple_md_theme_dark_onBackground = Color(0xFFE6E1E6) +val purple_md_theme_dark_outline = Color(0xFF948F99) +val purple_md_theme_dark_inverseOnSurface = Color(0xFF1D1B1E) +val purple_md_theme_dark_inverseSurface = Color(0xFFE6E1E6) +val purple_md_theme_dark_inversePrimary = Color(0xFF6F44BF) +val purple_md_theme_dark_surfaceTint = Color(0xFFD3BBFF) +val purple_md_theme_dark_outlineVariant = Color(0xFF49454E) +val purple_md_theme_dark_scrim = Color(0xFF000000) +val purple_md_theme_dark_surface = Color(0xFF141316) +val purple_md_theme_dark_onSurface = Color(0xFFCAC5CA) +val purple_md_theme_dark_surfaceVariant = Color(0xFF49454E) +val purple_md_theme_dark_onSurfaceVariant = Color(0xFFCBC4CF) + + +val purple_seed = Color(0xFF673BB7) + +// BROWN +val brown_md_theme_light_primary = Color(0xFF9A4520) +val brown_md_theme_light_onPrimary = Color(0xFFFFFFFF) +val brown_md_theme_light_primaryContainer = Color(0xFFFFDBCE) +val brown_md_theme_light_onPrimaryContainer = Color(0xFF370E00) +val brown_md_theme_light_secondary = Color(0xFF77574B) +val brown_md_theme_light_onSecondary = Color(0xFFFFFFFF) +val brown_md_theme_light_secondaryContainer = Color(0xFFFFDBCE) +val brown_md_theme_light_onSecondaryContainer = Color(0xFF2C160D) +val brown_md_theme_light_tertiary = Color(0xFF685F30) +val brown_md_theme_light_onTertiary = Color(0xFFFFFFFF) +val brown_md_theme_light_tertiaryContainer = Color(0xFFF1E3A8) +val brown_md_theme_light_onTertiaryContainer = Color(0xFF211B00) +val brown_md_theme_light_error = Color(0xFFBA1A1A) +val brown_md_theme_light_errorContainer = Color(0xFFFFDAD6) +val brown_md_theme_light_onError = Color(0xFFFFFFFF) +val brown_md_theme_light_onErrorContainer = Color(0xFF410002) +val brown_md_theme_light_background = Color(0xFFFFFBFF) +val brown_md_theme_light_onBackground = Color(0xFF201A18) +val brown_md_theme_light_outline = Color(0xFF85736D) +val brown_md_theme_light_inverseOnSurface = Color(0xFFFBEEEA) +val brown_md_theme_light_inverseSurface = Color(0xFF362F2C) +val brown_md_theme_light_inversePrimary = Color(0xFFFFB599) +val brown_md_theme_light_surfaceTint = Color(0xFF9A4520) +val brown_md_theme_light_outlineVariant = Color(0xFFD8C2BA) +val brown_md_theme_light_scrim = Color(0xFF000000) +val brown_md_theme_light_surface = Color(0xFFFFF8F6) +val brown_md_theme_light_onSurface = Color(0xFF201A18) +val brown_md_theme_light_surfaceVariant = Color(0xFFF5DED6) +val brown_md_theme_light_onSurfaceVariant = Color(0xFF53433E) + +val brown_md_theme_dark_primary = Color(0xFFFFB599) +val brown_md_theme_dark_onPrimary = Color(0xFF5A1C00) +val brown_md_theme_dark_primaryContainer = Color(0xFF7B2F0A) +val brown_md_theme_dark_onPrimaryContainer = Color(0xFFFFDBCE) +val brown_md_theme_dark_secondary = Color(0xFFE7BEAF) +val brown_md_theme_dark_onSecondary = Color(0xFF442A20) +val brown_md_theme_dark_secondaryContainer = Color(0xFF5D4035) +val brown_md_theme_dark_onSecondaryContainer = Color(0xFFFFDBCE) +val brown_md_theme_dark_tertiary = Color(0xFFD4C78E) +val brown_md_theme_dark_onTertiary = Color(0xFF383006) +val brown_md_theme_dark_tertiaryContainer = Color(0xFF4F471B) +val brown_md_theme_dark_onTertiaryContainer = Color(0xFFF1E3A8) +val brown_md_theme_dark_error = Color(0xFFFFB4AB) +val brown_md_theme_dark_errorContainer = Color(0xFF93000A) +val brown_md_theme_dark_onError = Color(0xFF690005) +val brown_md_theme_dark_onErrorContainer = Color(0xFFFFDAD6) +val brown_md_theme_dark_background = Color(0xFF201A18) +val brown_md_theme_dark_onBackground = Color(0xFFEDE0DC) +val brown_md_theme_dark_outline = Color(0xFFA08D86) +val brown_md_theme_dark_inverseOnSurface = Color(0xFF201A18) +val brown_md_theme_dark_inverseSurface = Color(0xFFEDE0DC) +val brown_md_theme_dark_inversePrimary = Color(0xFF9A4520) +val brown_md_theme_dark_surfaceTint = Color(0xFFFFB599) +val brown_md_theme_dark_outlineVariant = Color(0xFF53433E) +val brown_md_theme_dark_scrim = Color(0xFF000000) +val brown_md_theme_dark_surface = Color(0xFF181210) +val brown_md_theme_dark_onSurface = Color(0xFFD0C4C0) +val brown_md_theme_dark_surfaceVariant = Color(0xFF53433E) +val brown_md_theme_dark_onSurfaceVariant = Color(0xFFD8C2BA) + + +val brown_seed = Color(0xFF795547) + +// GRAY +val gray_md_theme_light_primary = Color(0xFF006783) +val gray_md_theme_light_onPrimary = Color(0xFFFFFFFF) +val gray_md_theme_light_primaryContainer = Color(0xFFBDE9FF) +val gray_md_theme_light_onPrimaryContainer = Color(0xFF001F2A) +val gray_md_theme_light_secondary = Color(0xFF4D616C) +val gray_md_theme_light_onSecondary = Color(0xFFFFFFFF) +val gray_md_theme_light_secondaryContainer = Color(0xFFD0E6F2) +val gray_md_theme_light_onSecondaryContainer = Color(0xFF081E27) +val gray_md_theme_light_tertiary = Color(0xFF5D5B7D) +val gray_md_theme_light_onTertiary = Color(0xFFFFFFFF) +val gray_md_theme_light_tertiaryContainer = Color(0xFFE3DFFF) +val gray_md_theme_light_onTertiaryContainer = Color(0xFF191836) +val gray_md_theme_light_error = Color(0xFFBA1A1A) +val gray_md_theme_light_errorContainer = Color(0xFFFFDAD6) +val gray_md_theme_light_onError = Color(0xFFFFFFFF) +val gray_md_theme_light_onErrorContainer = Color(0xFF410002) +val gray_md_theme_light_background = Color(0xFFFBFCFE) +val gray_md_theme_light_onBackground = Color(0xFF191C1E) +val gray_md_theme_light_outline = Color(0xFF70787D) +val gray_md_theme_light_inverseOnSurface = Color(0xFFEFF1F3) +val gray_md_theme_light_inverseSurface = Color(0xFF2E3132) +val gray_md_theme_light_inversePrimary = Color(0xFF65D3FF) +val gray_md_theme_light_surfaceTint = Color(0xFF006783) +val gray_md_theme_light_outlineVariant = Color(0xFFC0C8CD) +val gray_md_theme_light_scrim = Color(0xFF000000) +val gray_md_theme_light_surface = Color(0xFFF8F9FB) +val gray_md_theme_light_onSurface = Color(0xFF191C1E) +val gray_md_theme_light_surfaceVariant = Color(0xFFDCE4E9) +val gray_md_theme_light_onSurfaceVariant = Color(0xFF40484C) + +val gray_md_theme_dark_primary = Color(0xFF65D3FF) +val gray_md_theme_dark_onPrimary = Color(0xFF003546) +val gray_md_theme_dark_primaryContainer = Color(0xFF004D64) +val gray_md_theme_dark_onPrimaryContainer = Color(0xFFBDE9FF) +val gray_md_theme_dark_secondary = Color(0xFFB4CAD6) +val gray_md_theme_dark_onSecondary = Color(0xFF1F333C) +val gray_md_theme_dark_secondaryContainer = Color(0xFF354A53) +val gray_md_theme_dark_onSecondaryContainer = Color(0xFFD0E6F2) +val gray_md_theme_dark_tertiary = Color(0xFFC6C2EA) +val gray_md_theme_dark_onTertiary = Color(0xFF2E2D4D) +val gray_md_theme_dark_tertiaryContainer = Color(0xFF454364) +val gray_md_theme_dark_onTertiaryContainer = Color(0xFFE3DFFF) +val gray_md_theme_dark_error = Color(0xFFFFB4AB) +val gray_md_theme_dark_errorContainer = Color(0xFF93000A) +val gray_md_theme_dark_onError = Color(0xFF690005) +val gray_md_theme_dark_onErrorContainer = Color(0xFFFFDAD6) +val gray_md_theme_dark_background = Color(0xFF191C1E) +val gray_md_theme_dark_onBackground = Color(0xFFE1E2E4) +val gray_md_theme_dark_outline = Color(0xFF8A9297) +val gray_md_theme_dark_inverseOnSurface = Color(0xFF191C1E) +val gray_md_theme_dark_inverseSurface = Color(0xFFE1E2E4) +val gray_md_theme_dark_inversePrimary = Color(0xFF006783) +val gray_md_theme_dark_surfaceTint = Color(0xFF65D3FF) +val gray_md_theme_dark_outlineVariant = Color(0xFF40484C) +val gray_md_theme_dark_scrim = Color(0xFF000000) +val gray_md_theme_dark_surface = Color(0xFF111415) +val gray_md_theme_dark_onSurface = Color(0xFFC5C7C8) +val gray_md_theme_dark_surfaceVariant = Color(0xFF40484C) +val gray_md_theme_dark_onSurfaceVariant = Color(0xFFC0C8CD) + + +val gray_seed = Color(0xFF607D8B) diff --git a/app/src/main/java/com/github/jing332/tts_dict_editor/ui/theme/Theme.kt b/app/src/main/java/com/github/jing332/tts_dict_editor/ui/theme/Theme.kt index b99bc42..1ab855c 100644 --- a/app/src/main/java/com/github/jing332/tts_dict_editor/ui/theme/Theme.kt +++ b/app/src/main/java/com/github/jing332/tts_dict_editor/ui/theme/Theme.kt @@ -1,70 +1,120 @@ -package com.github.jing332.tts_dict_editor.ui.theme +package io.github.lumyuan.turingbox.ui.theme -import android.app.Activity -import android.os.Build +import android.content.Context +import android.view.WindowManager +import androidx.activity.ComponentActivity import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.material3.ColorScheme import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.darkColorScheme -import androidx.compose.material3.dynamicDarkColorScheme -import androidx.compose.material3.dynamicLightColorScheme -import androidx.compose.material3.lightColorScheme +import androidx.compose.material3.Surface import androidx.compose.runtime.Composable -import androidx.compose.runtime.SideEffect -import androidx.compose.ui.graphics.toArgb +import androidx.compose.runtime.MutableState +import androidx.compose.runtime.mutableStateOf +import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalView -import androidx.core.view.WindowCompat +import com.github.jing332.tts_dict_editor.help.AppConfig +import com.github.jing332.tts_dict_editor.ui.theme.AppTheme +import com.github.jing332.tts_dict_editor.ui.theme.Typography +import com.github.jing332.tts_dict_editor.ui.theme.blueTheme +import com.github.jing332.tts_dict_editor.ui.theme.brownTheme +import com.github.jing332.tts_dict_editor.ui.theme.cyanTheme +import com.github.jing332.tts_dict_editor.ui.theme.defaultTheme +import com.github.jing332.tts_dict_editor.ui.theme.dynamicColorTheme +import com.github.jing332.tts_dict_editor.ui.theme.grayTheme +import com.github.jing332.tts_dict_editor.ui.theme.greenTheme +import com.github.jing332.tts_dict_editor.ui.theme.orangeTheme +import com.github.jing332.tts_dict_editor.ui.theme.pinkTheme +import com.github.jing332.tts_dict_editor.ui.theme.purpleTheme +import com.github.jing332.tts_dict_editor.ui.theme.redTheme +import com.github.jing332.tts_dict_editor.ui.theme.themeAnimation +import com.gyf.immersionbar.ImmersionBar -private val DarkColorScheme = darkColorScheme( - primary = Purple80, - secondary = PurpleGrey80, - tertiary = Pink80 -) +/** + * 获取当前主题 + */ +@Composable +fun appTheme( + themeType: AppTheme, + darkTheme: Boolean = isSystemInDarkTheme(), + context: Context = LocalContext.current +): ColorScheme = + when (themeType) { + AppTheme.DEFAULT -> defaultTheme(darkTheme) + AppTheme.DYNAMIC_COLOR -> dynamicColorTheme(darkTheme, context) + AppTheme.GREEN -> greenTheme(darkTheme) + AppTheme.RED -> redTheme(darkTheme) + AppTheme.PINK -> pinkTheme(darkTheme) + AppTheme.BLUE -> blueTheme(darkTheme) + AppTheme.CYAN -> cyanTheme(darkTheme) + AppTheme.ORANGE -> orangeTheme(darkTheme) + AppTheme.PURPLE -> purpleTheme(darkTheme) + AppTheme.BROWN -> brownTheme(darkTheme) + AppTheme.GRAY -> grayTheme(darkTheme) + } -private val LightColorScheme = lightColorScheme( - primary = Purple40, - secondary = PurpleGrey40, - tertiary = Pink40 +//全局主题状态 +private val themeTypeState: MutableState by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) { + mutableStateOf(AppTheme.DEFAULT) +} + +@Composable +private fun InitTheme() { + val theme = try { + AppConfig.theme.value + } catch (e: Exception) { + e.printStackTrace() + AppTheme.DEFAULT + } + setAppTheme(themeType = theme) +} - /* Other default colors to override - background = Color(0xFFFFFBFE), - surface = Color(0xFFFFFBFE), - onPrimary = Color.White, - onSecondary = Color.White, - onTertiary = Color.White, - onBackground = Color(0xFF1C1B1F), - onSurface = Color(0xFF1C1B1F), - */ -) +/** + * 设置主题 + */ +fun setAppTheme(themeType: AppTheme) { + themeTypeState.value = themeType + AppConfig.theme.value = themeType +} +/** + * 获取当前主题 + */ +fun getAppTheme(): AppTheme = themeTypeState.value + +/** + * 根Context + */ @Composable -fun AppTheme( +fun DictEditorTheme( + modifier: Modifier = Modifier, darkTheme: Boolean = isSystemInDarkTheme(), - // Dynamic color is available on Android 12+ - dynamicColor: Boolean = true, content: @Composable () -> Unit ) { - val colorScheme = when { - dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> { - val context = LocalContext.current - if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context) - } + //初始化主题 + InitTheme() - darkTheme -> DarkColorScheme - else -> LightColorScheme - } - val view = LocalView.current - if (!view.isInEditMode) { - SideEffect { - val window = (view.context as Activity).window - window.statusBarColor = colorScheme.primary.toArgb() - WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = darkTheme - } - } + //获取当前主题 + val targetTheme = appTheme(themeType = themeTypeState.value) + + //沉浸式状态栏 + ImmersionBar.with(LocalView.current.context as ComponentActivity) + .transparentStatusBar() + .transparentNavigationBar() + .statusBarDarkFont(!darkTheme) + .navigationBarDarkIcon(!darkTheme) +// .keyboardEnable(true) + .keyboardMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE) + .init() MaterialTheme( - colorScheme = colorScheme, - typography = Typography, - content = content - ) + colorScheme = themeAnimation(targetTheme = targetTheme), + typography = Typography + ) { + Surface( + modifier = modifier, + color = MaterialTheme.colorScheme.background, + content = content + ) + } } \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8e0edae..106a2a2 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -56,4 +56,17 @@ 导出(自定义格式) 自定义格式 Json格式 + 默认 + 动态颜色 + 橙色 + 绿色 + 红色 + 粉色 + 蓝色 + 青色 + 紫色 + 棕色 + 灰色 + 主题 + 您的系统不支持动态主题(需Android12及以上) \ No newline at end of file