feat(theme): add color and typography definitions for the app
This commit is contained in:
@@ -0,0 +1,33 @@
|
|||||||
|
package de.harheimertc.ui.theme
|
||||||
|
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
|
||||||
|
// Primary (Tailwind)
|
||||||
|
val Primary50 = Color(0xFFFEF2F2)
|
||||||
|
val Primary100 = Color(0xFFFEE2E2)
|
||||||
|
val Primary200 = Color(0xFFFECACA)
|
||||||
|
val Primary300 = Color(0xFFFCA5A5)
|
||||||
|
val Primary400 = Color(0xFFF87171)
|
||||||
|
val Primary500 = Color(0xFFEF4444)
|
||||||
|
val Primary600 = Color(0xFFDC2626)
|
||||||
|
val Primary700 = Color(0xFFB91C1C)
|
||||||
|
val Primary800 = Color(0xFF991B1B)
|
||||||
|
val Primary900 = Color(0xFF7F1D1D)
|
||||||
|
|
||||||
|
// Accent (Tailwind gray-ish palette)
|
||||||
|
val Accent50 = Color(0xFFFAFAFA)
|
||||||
|
val Accent100 = Color(0xFFF4F4F5)
|
||||||
|
val Accent200 = Color(0xFFE4E4E7)
|
||||||
|
val Accent300 = Color(0xFFD4D4D8)
|
||||||
|
val Accent400 = Color(0xFFA1A1AA)
|
||||||
|
val Accent500 = Color(0xFF71717A)
|
||||||
|
val Accent600 = Color(0xFF52525B)
|
||||||
|
val Accent700 = Color(0xFF3F3F46)
|
||||||
|
val Accent800 = Color(0xFF27272A)
|
||||||
|
val Accent900 = Color(0xFF18181B)
|
||||||
|
|
||||||
|
// Other semantic colors
|
||||||
|
val AppBackground = Color(0xFFFFFFFF)
|
||||||
|
val AppSurface = Accent50
|
||||||
|
val AppOnPrimary = Color(0xFFFFFFFF)
|
||||||
|
val AppError = Color(0xFFB00020)
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package de.harheimertc.ui.theme
|
||||||
|
|
||||||
|
import androidx.compose.material3.MaterialTheme
|
||||||
|
import androidx.compose.material3.lightColorScheme
|
||||||
|
import androidx.compose.material3.darkColorScheme
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
|
||||||
|
private val LightColors = lightColorScheme(
|
||||||
|
primary = Primary500,
|
||||||
|
onPrimary = AppOnPrimary,
|
||||||
|
primaryContainer = Primary100,
|
||||||
|
secondary = Accent500,
|
||||||
|
background = AppBackground,
|
||||||
|
surface = AppSurface,
|
||||||
|
error = AppError,
|
||||||
|
)
|
||||||
|
|
||||||
|
private val DarkColors = darkColorScheme(
|
||||||
|
primary = Primary300,
|
||||||
|
onPrimary = AppOnPrimary,
|
||||||
|
primaryContainer = Primary700,
|
||||||
|
secondary = Accent300,
|
||||||
|
background = Accent900,
|
||||||
|
surface = Accent800,
|
||||||
|
error = AppError,
|
||||||
|
)
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun HarheimerTheme(
|
||||||
|
darkTheme: Boolean = false,
|
||||||
|
content: @Composable () -> Unit
|
||||||
|
) {
|
||||||
|
val colors = if (darkTheme) DarkColors else LightColors
|
||||||
|
|
||||||
|
MaterialTheme(
|
||||||
|
colorScheme = colors,
|
||||||
|
typography = AppTypography,
|
||||||
|
shapes = MaterialTheme.shapes,
|
||||||
|
content = content
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package de.harheimertc.ui.theme
|
||||||
|
|
||||||
|
import androidx.compose.material3.Typography
|
||||||
|
import androidx.compose.ui.text.font.FontFamily
|
||||||
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
|
import androidx.compose.ui.unit.sp
|
||||||
|
|
||||||
|
// Placeholder typography mapping. Replace with bundled Inter / Montserrat fonts when added.
|
||||||
|
val AppTypography = Typography(
|
||||||
|
displayLarge = androidx.compose.ui.text.TextStyle(
|
||||||
|
fontFamily = FontFamily.Default,
|
||||||
|
fontWeight = FontWeight.SemiBold,
|
||||||
|
fontSize = 30.sp
|
||||||
|
),
|
||||||
|
titleLarge = androidx.compose.ui.text.TextStyle(
|
||||||
|
fontFamily = FontFamily.Default,
|
||||||
|
fontWeight = FontWeight.Medium,
|
||||||
|
fontSize = 20.sp
|
||||||
|
),
|
||||||
|
bodyLarge = androidx.compose.ui.text.TextStyle(
|
||||||
|
fontFamily = FontFamily.SansSerif,
|
||||||
|
fontWeight = FontWeight.Normal,
|
||||||
|
fontSize = 16.sp
|
||||||
|
),
|
||||||
|
bodyMedium = androidx.compose.ui.text.TextStyle(
|
||||||
|
fontFamily = FontFamily.SansSerif,
|
||||||
|
fontWeight = FontWeight.Normal,
|
||||||
|
fontSize = 14.sp
|
||||||
|
),
|
||||||
|
labelSmall = androidx.compose.ui.text.TextStyle(
|
||||||
|
fontFamily = FontFamily.SansSerif,
|
||||||
|
fontWeight = FontWeight.Medium,
|
||||||
|
fontSize = 12.sp
|
||||||
|
)
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user