1package soy.iko.opencode.ui.theme
4import androidx.compose.foundation.isSystemInDarkTheme
5import androidx.compose.material3.MaterialTheme
6import androidx.compose.material3.darkColorScheme
7import androidx.compose.material3.dynamicDarkColorScheme
8import androidx.compose.material3.dynamicLightColorScheme
9import androidx.compose.material3.lightColorScheme
10import androidx.compose.runtime.Composable
11import androidx.compose.ui.graphics.Color
12import androidx.compose.ui.platform.LocalContext
14private val DarkColors = darkColorScheme(
16 onPrimary = Color(0xFF0F1115),
17 primaryContainer = Color(0xFF1A3D2A),
18 onPrimaryContainer = Color(0xFFA8E6C1),
19 secondary = EmeraldDark,
20 tertiaryContainer = Color(0xFF2A2A3D),
21 onTertiaryContainer = Color(0xFFC5C5E6),
22 errorContainer = Color(0xFF4D2626),
23 onErrorContainer = Color(0xFFFFB4B4),
24 background = DarkBackground,
25 surface = DarkSurface,
26 surfaceVariant = DarkSurfaceVariant,
27 onSurface = DarkOnSurface,
28 outline = DarkOutline,
31private val LightColors = lightColorScheme(
32 primary = EmeraldDark,
33 primaryContainer = Color(0xFFD7F5E3),
34 onPrimaryContainer = Color(0xFF0A3D22),
36 tertiaryContainer = Color(0xFFE8E8F5),
37 onTertiaryContainer = Color(0xFF2A2A4D),
38 errorContainer = Color(0xFFFFE0E0),
39 onErrorContainer = Color(0xFF660000),
40 background = LightBackground,
41 surface = LightSurface,
42 surfaceVariant = LightSurfaceVariant,
43 onSurface = LightOnSurface,
44 outline = LightOutline,
49 darkTheme: Boolean = isSystemInDarkTheme(),
50 dynamicColor: Boolean = false,
51 content: @Composable () -> Unit,
53 val context = LocalContext.current
54 val colorScheme = when {
55 dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S ->
56 if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
57 darkTheme -> DarkColors
62 colorScheme = colorScheme,
63 typography = AppTypography,
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list