P1 Stream A: design tokens — verify color parity with iOS + typography
11 themes x 9 colors x 2 modes (198 values) now parametrized-tested against docs/ios-parity/colors.json as ground truth. Typography scale matches iOS dynamic-type defaults. 118 of 198 color values were off before — mostly off-by-one RGB rounding errors introduced during a prior hand-copy from iOS. Default TextSecondary (light+dark) also lost its 0x99 alpha channel — now restored via Color(0xAARRGGBB) packed literals. Added SansSerif fontFamily and source citations on every Typography size so the iOS dynamic-type mapping is explicit. Tests: ThemeColorsTest (4), TypographyTest (5), SpacingTest (1) — all green. `everyColorMatchesIosGroundTruth` walks the embedded JSON and asserts 198 hex values match exactly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,8 +3,14 @@ package com.tt.honeyDue.ui.theme
|
||||
import androidx.compose.ui.graphics.Color
|
||||
|
||||
/**
|
||||
* Data class representing a complete theme's color palette
|
||||
* Matches the iOS theme system with 11 themes
|
||||
* Data class representing a complete theme's color palette.
|
||||
*
|
||||
* Ground truth for every color below is the iOS app — captured in
|
||||
* `docs/ios-parity/colors.json` and asserted by
|
||||
* `composeApp/src/commonTest/kotlin/com/tt/honeyDue/ui/theme/ThemeColorsTest.kt`.
|
||||
*
|
||||
* When a value needs to change, update iOS first, refresh `colors.json`,
|
||||
* then mirror it here so the parity test stays green.
|
||||
*/
|
||||
data class ThemeColors(
|
||||
val id: String,
|
||||
@@ -35,7 +41,12 @@ data class ThemeColors(
|
||||
)
|
||||
|
||||
/**
|
||||
* All available themes matching iOS implementation
|
||||
* All available themes matching iOS implementation.
|
||||
*
|
||||
* Color hex literals here use the `0xAARRGGBB` packed form — so 6-digit
|
||||
* iOS values (#RRGGBB) become `0xFFRRGGBB` (fully opaque), while 8-digit
|
||||
* iOS values (#RRGGBBAA, used by Default TextSecondary) have their alpha
|
||||
* byte re-ordered to leading position: `#RRGGBBAA` → `0xAARRGGBB`.
|
||||
*/
|
||||
object AppThemes {
|
||||
val Default = ThemeColors(
|
||||
@@ -43,26 +54,28 @@ object AppThemes {
|
||||
displayName = "Default",
|
||||
description = "Vibrant iOS system colors",
|
||||
|
||||
// Light mode
|
||||
lightPrimary = Color(0xFF0079FF),
|
||||
lightSecondary = Color(0xFF5AC7F9),
|
||||
lightAccent = Color(0xFFFF9400),
|
||||
lightError = Color(0xFFFF3A2F),
|
||||
// Light mode — iOS Default
|
||||
lightPrimary = Color(0xFF007AFF),
|
||||
lightSecondary = Color(0xFF5AC8FA),
|
||||
lightAccent = Color(0xFFFF9500),
|
||||
lightError = Color(0xFFFF3B30),
|
||||
lightBackgroundPrimary = Color(0xFFFFFFFF),
|
||||
lightBackgroundSecondary = Color(0xFFF1F7F7),
|
||||
lightBackgroundSecondary = Color(0xFFF2F7F7),
|
||||
lightTextPrimary = Color(0xFF111111),
|
||||
lightTextSecondary = Color(0xFF3C3C3C),
|
||||
// iOS "#3D3D3D99" — 0x99 alpha, 0x3D3D3D RGB
|
||||
lightTextSecondary = Color(0x993D3D3D),
|
||||
lightTextOnPrimary = Color(0xFFFFFFFF),
|
||||
|
||||
// Dark mode
|
||||
darkPrimary = Color(0xFF0984FF),
|
||||
darkSecondary = Color(0xFF63D2FF),
|
||||
darkAccent = Color(0xFFFF9F09),
|
||||
darkError = Color(0xFFFF4539),
|
||||
// Dark mode — iOS Default
|
||||
darkPrimary = Color(0xFF0A84FF),
|
||||
darkSecondary = Color(0xFF64D2FF),
|
||||
darkAccent = Color(0xFFFF9F0A),
|
||||
darkError = Color(0xFFFF453A),
|
||||
darkBackgroundPrimary = Color(0xFF1C1C1C),
|
||||
darkBackgroundSecondary = Color(0xFF2C2C2C),
|
||||
darkTextPrimary = Color(0xFFFFFFFF),
|
||||
darkTextSecondary = Color(0xFFEBEBEB),
|
||||
// iOS "#EBEBEB99"
|
||||
darkTextSecondary = Color(0x99EBEBEB),
|
||||
darkTextOnPrimary = Color(0xFFFFFFFF)
|
||||
)
|
||||
|
||||
@@ -71,26 +84,24 @@ object AppThemes {
|
||||
displayName = "Teal",
|
||||
description = "Blue-green with warm accents",
|
||||
|
||||
// Light mode
|
||||
lightPrimary = Color(0xFF069FC3),
|
||||
lightSecondary = Color(0xFF0054A4),
|
||||
lightAccent = Color(0xFFEFC707),
|
||||
lightPrimary = Color(0xFF07A0C3),
|
||||
lightSecondary = Color(0xFF0055A5),
|
||||
lightAccent = Color(0xFFF0C808),
|
||||
lightError = Color(0xFFDD1C1A),
|
||||
lightBackgroundPrimary = Color(0xFFFFF0D0),
|
||||
lightBackgroundPrimary = Color(0xFFFFF1D0),
|
||||
lightBackgroundSecondary = Color(0xFFFFFFFF),
|
||||
lightTextPrimary = Color(0xFF111111),
|
||||
lightTextSecondary = Color(0xFF444444),
|
||||
lightTextOnPrimary = Color(0xFFFFFFFF),
|
||||
|
||||
// Dark mode
|
||||
darkPrimary = Color(0xFF60CCE2),
|
||||
darkSecondary = Color(0xFF60A5D8),
|
||||
darkAccent = Color(0xFFEFC707),
|
||||
darkError = Color(0xFFFF5244),
|
||||
darkBackgroundPrimary = Color(0xFF091829),
|
||||
darkBackgroundSecondary = Color(0xFF1A2E3E),
|
||||
darkPrimary = Color(0xFF61CCE3),
|
||||
darkSecondary = Color(0xFF61A6D9),
|
||||
darkAccent = Color(0xFFF0C808),
|
||||
darkError = Color(0xFFFF5344),
|
||||
darkBackgroundPrimary = Color(0xFF0A1929),
|
||||
darkBackgroundSecondary = Color(0xFF1A2F3F),
|
||||
darkTextPrimary = Color(0xFFF5F5F5),
|
||||
darkTextSecondary = Color(0xFFC6C6C6),
|
||||
darkTextSecondary = Color(0xFFC7C7C7),
|
||||
darkTextOnPrimary = Color(0xFFFFFFFF)
|
||||
)
|
||||
|
||||
@@ -99,26 +110,24 @@ object AppThemes {
|
||||
displayName = "Ocean",
|
||||
description = "Deep blues and coral tones",
|
||||
|
||||
// Light mode
|
||||
lightPrimary = Color(0xFF006B8F),
|
||||
lightSecondary = Color(0xFF008A8A),
|
||||
lightAccent = Color(0xFFFF7E50),
|
||||
lightSecondary = Color(0xFF008B8B),
|
||||
lightAccent = Color(0xFFFF7F50),
|
||||
lightError = Color(0xFFDD1C1A),
|
||||
lightBackgroundPrimary = Color(0xFFE4EBF1),
|
||||
lightBackgroundSecondary = Color(0xFFBCCAD5),
|
||||
lightBackgroundPrimary = Color(0xFFE5ECF2),
|
||||
lightBackgroundSecondary = Color(0xFFBDCBD6),
|
||||
lightTextPrimary = Color(0xFF111111),
|
||||
lightTextSecondary = Color(0xFF444444),
|
||||
lightTextOnPrimary = Color(0xFFFFFFFF),
|
||||
|
||||
// Dark mode
|
||||
darkPrimary = Color(0xFF49B5D1),
|
||||
darkSecondary = Color(0xFF60D1C6),
|
||||
darkAccent = Color(0xFFFF7E50),
|
||||
darkError = Color(0xFFFF5244),
|
||||
darkBackgroundPrimary = Color(0xFF161B22),
|
||||
darkBackgroundSecondary = Color(0xFF313A4B),
|
||||
darkPrimary = Color(0xFF4AB5D1),
|
||||
darkSecondary = Color(0xFF61D1C7),
|
||||
darkAccent = Color(0xFFFF7F50),
|
||||
darkError = Color(0xFFFF5344),
|
||||
darkBackgroundPrimary = Color(0xFF171B23),
|
||||
darkBackgroundSecondary = Color(0xFF323B4C),
|
||||
darkTextPrimary = Color(0xFFF5F5F5),
|
||||
darkTextSecondary = Color(0xFFC6C6C6),
|
||||
darkTextSecondary = Color(0xFFC7C7C7),
|
||||
darkTextOnPrimary = Color(0xFFFFFFFF)
|
||||
)
|
||||
|
||||
@@ -127,26 +136,24 @@ object AppThemes {
|
||||
displayName = "Forest",
|
||||
description = "Earth greens and golden hues",
|
||||
|
||||
// Light mode
|
||||
lightPrimary = Color(0xFF2C5015),
|
||||
lightSecondary = Color(0xFF6B8E22),
|
||||
lightAccent = Color(0xFFFFD600),
|
||||
lightPrimary = Color(0xFF2D5016),
|
||||
lightSecondary = Color(0xFF6B8E23),
|
||||
lightAccent = Color(0xFFFFD700),
|
||||
lightError = Color(0xFFDD1C1A),
|
||||
lightBackgroundPrimary = Color(0xFFEBEEE2),
|
||||
lightBackgroundSecondary = Color(0xFFC1C8AD),
|
||||
lightBackgroundPrimary = Color(0xFFECEFE3),
|
||||
lightBackgroundSecondary = Color(0xFFC1C9AE),
|
||||
lightTextPrimary = Color(0xFF111111),
|
||||
lightTextSecondary = Color(0xFF444444),
|
||||
lightTextOnPrimary = Color(0xFFFFFFFF),
|
||||
|
||||
// Dark mode
|
||||
darkPrimary = Color(0xFF93C66B),
|
||||
darkSecondary = Color(0xFFAFD182),
|
||||
darkAccent = Color(0xFFFFD600),
|
||||
darkError = Color(0xFFFF5244),
|
||||
darkBackgroundPrimary = Color(0xFF181E17),
|
||||
darkPrimary = Color(0xFF94C76B),
|
||||
darkSecondary = Color(0xFFB0D182),
|
||||
darkAccent = Color(0xFFFFD700),
|
||||
darkError = Color(0xFFFF5344),
|
||||
darkBackgroundPrimary = Color(0xFF191E18),
|
||||
darkBackgroundSecondary = Color(0xFF384436),
|
||||
darkTextPrimary = Color(0xFFF5F5F5),
|
||||
darkTextSecondary = Color(0xFFC6C6C6),
|
||||
darkTextSecondary = Color(0xFFC7C7C7),
|
||||
darkTextOnPrimary = Color(0xFFFFFFFF)
|
||||
)
|
||||
|
||||
@@ -155,26 +162,24 @@ object AppThemes {
|
||||
displayName = "Sunset",
|
||||
description = "Warm oranges and reds",
|
||||
|
||||
// Light mode
|
||||
lightPrimary = Color(0xFFFF4500),
|
||||
lightSecondary = Color(0xFFFF6246),
|
||||
lightAccent = Color(0xFFFFD600),
|
||||
lightSecondary = Color(0xFFFF6347),
|
||||
lightAccent = Color(0xFFFFD700),
|
||||
lightError = Color(0xFFDD1C1A),
|
||||
lightBackgroundPrimary = Color(0xFFF7F0E8),
|
||||
lightBackgroundSecondary = Color(0xFFDCD0BA),
|
||||
lightBackgroundPrimary = Color(0xFFF7F1E8),
|
||||
lightBackgroundSecondary = Color(0xFFDCD0BB),
|
||||
lightTextPrimary = Color(0xFF111111),
|
||||
lightTextSecondary = Color(0xFF444444),
|
||||
lightTextOnPrimary = Color(0xFFFFFFFF),
|
||||
|
||||
// Dark mode
|
||||
darkPrimary = Color(0xFFFF9E60),
|
||||
darkSecondary = Color(0xFFFFAD7C),
|
||||
darkAccent = Color(0xFFFFD600),
|
||||
darkError = Color(0xFFFF5244),
|
||||
darkBackgroundPrimary = Color(0xFF201813),
|
||||
darkPrimary = Color(0xFFFF9E61),
|
||||
darkSecondary = Color(0xFFFFAD7D),
|
||||
darkAccent = Color(0xFFFFD700),
|
||||
darkError = Color(0xFFFF5344),
|
||||
darkBackgroundPrimary = Color(0xFF211914),
|
||||
darkBackgroundSecondary = Color(0xFF433329),
|
||||
darkTextPrimary = Color(0xFFF5F5F5),
|
||||
darkTextSecondary = Color(0xFFC6C6C6),
|
||||
darkTextSecondary = Color(0xFFC7C7C7),
|
||||
darkTextOnPrimary = Color(0xFFFFFFFF)
|
||||
)
|
||||
|
||||
@@ -183,26 +188,24 @@ object AppThemes {
|
||||
displayName = "Monochrome",
|
||||
description = "Elegant grayscale",
|
||||
|
||||
// Light mode
|
||||
lightPrimary = Color(0xFF333333),
|
||||
lightSecondary = Color(0xFF666666),
|
||||
lightAccent = Color(0xFF999999),
|
||||
lightError = Color(0xFFDD1C1A),
|
||||
lightBackgroundPrimary = Color(0xFFF0F0F0),
|
||||
lightBackgroundSecondary = Color(0xFFD4D4D4),
|
||||
lightBackgroundPrimary = Color(0xFFF1F1F1),
|
||||
lightBackgroundSecondary = Color(0xFFD5D5D5),
|
||||
lightTextPrimary = Color(0xFF111111),
|
||||
lightTextSecondary = Color(0xFF444444),
|
||||
lightTextOnPrimary = Color(0xFFFFFFFF),
|
||||
|
||||
// Dark mode
|
||||
darkPrimary = Color(0xFFE5E5E5),
|
||||
darkPrimary = Color(0xFFE6E6E6),
|
||||
darkSecondary = Color(0xFFBFBFBF),
|
||||
darkAccent = Color(0xFFD1D1D1),
|
||||
darkError = Color(0xFFFF5244),
|
||||
darkBackgroundPrimary = Color(0xFF161616),
|
||||
darkBackgroundSecondary = Color(0xFF3B3B3B),
|
||||
darkError = Color(0xFFFF5344),
|
||||
darkBackgroundPrimary = Color(0xFF171717),
|
||||
darkBackgroundSecondary = Color(0xFF3C3C3C),
|
||||
darkTextPrimary = Color(0xFFF5F5F5),
|
||||
darkTextSecondary = Color(0xFFC6C6C6),
|
||||
darkTextSecondary = Color(0xFFC7C7C7),
|
||||
darkTextOnPrimary = Color(0xFFFFFFFF)
|
||||
)
|
||||
|
||||
@@ -211,26 +214,24 @@ object AppThemes {
|
||||
displayName = "Lavender",
|
||||
description = "Soft purple with pink accents",
|
||||
|
||||
// Light mode
|
||||
lightPrimary = Color(0xFF6B418A),
|
||||
lightSecondary = Color(0xFF8A60AF),
|
||||
lightAccent = Color(0xFFE24982),
|
||||
lightPrimary = Color(0xFF6B418B),
|
||||
lightSecondary = Color(0xFF8B61B0),
|
||||
lightAccent = Color(0xFFE34A82),
|
||||
lightError = Color(0xFFDD1C1A),
|
||||
lightBackgroundPrimary = Color(0xFFF1EFF5),
|
||||
lightBackgroundSecondary = Color(0xFFD9D1DF),
|
||||
lightBackgroundPrimary = Color(0xFFF2F0F5),
|
||||
lightBackgroundSecondary = Color(0xFFD9D1E0),
|
||||
lightTextPrimary = Color(0xFF111111),
|
||||
lightTextSecondary = Color(0xFF444444),
|
||||
lightTextOnPrimary = Color(0xFFFFFFFF),
|
||||
|
||||
// Dark mode
|
||||
darkPrimary = Color(0xFFD1AFE2),
|
||||
darkSecondary = Color(0xFFDDBFEA),
|
||||
darkAccent = Color(0xFFFF9EC6),
|
||||
darkError = Color(0xFFFF5244),
|
||||
darkBackgroundPrimary = Color(0xFF17131E),
|
||||
darkBackgroundSecondary = Color(0xFF393042),
|
||||
darkPrimary = Color(0xFFD1B0E3),
|
||||
darkSecondary = Color(0xFFDEBFEB),
|
||||
darkAccent = Color(0xFFFF9EC7),
|
||||
darkError = Color(0xFFFF5344),
|
||||
darkBackgroundPrimary = Color(0xFF18141E),
|
||||
darkBackgroundSecondary = Color(0xFF393142),
|
||||
darkTextPrimary = Color(0xFFF5F5F5),
|
||||
darkTextSecondary = Color(0xFFC6C6C6),
|
||||
darkTextSecondary = Color(0xFFC7C7C7),
|
||||
darkTextOnPrimary = Color(0xFFFFFFFF)
|
||||
)
|
||||
|
||||
@@ -239,26 +240,24 @@ object AppThemes {
|
||||
displayName = "Crimson",
|
||||
description = "Bold red with warm highlights",
|
||||
|
||||
// Light mode
|
||||
lightPrimary = Color(0xFFB51E28),
|
||||
lightSecondary = Color(0xFF992D38),
|
||||
lightAccent = Color(0xFFE26000),
|
||||
lightSecondary = Color(0xFF992E38),
|
||||
lightAccent = Color(0xFFE36100),
|
||||
lightError = Color(0xFFDD1C1A),
|
||||
lightBackgroundPrimary = Color(0xFFF6EDEB),
|
||||
lightBackgroundPrimary = Color(0xFFF6EEEC),
|
||||
lightBackgroundSecondary = Color(0xFFDECFCC),
|
||||
lightTextPrimary = Color(0xFF111111),
|
||||
lightTextSecondary = Color(0xFF444444),
|
||||
lightTextOnPrimary = Color(0xFFFFFFFF),
|
||||
|
||||
// Dark mode
|
||||
darkPrimary = Color(0xFFFF827C),
|
||||
darkSecondary = Color(0xFFF99993),
|
||||
darkPrimary = Color(0xFFFF827D),
|
||||
darkSecondary = Color(0xFFFA9994),
|
||||
darkAccent = Color(0xFFFFB56B),
|
||||
darkError = Color(0xFFFF5244),
|
||||
darkBackgroundPrimary = Color(0xFF1B1215),
|
||||
darkBackgroundSecondary = Color(0xFF412E39),
|
||||
darkError = Color(0xFFFF5344),
|
||||
darkBackgroundPrimary = Color(0xFF1B1216),
|
||||
darkBackgroundSecondary = Color(0xFF412F39),
|
||||
darkTextPrimary = Color(0xFFF5F5F5),
|
||||
darkTextSecondary = Color(0xFFC6C6C6),
|
||||
darkTextSecondary = Color(0xFFC7C7C7),
|
||||
darkTextOnPrimary = Color(0xFFFFFFFF)
|
||||
)
|
||||
|
||||
@@ -267,26 +266,24 @@ object AppThemes {
|
||||
displayName = "Midnight",
|
||||
description = "Deep navy with sky blue",
|
||||
|
||||
// Light mode
|
||||
lightPrimary = Color(0xFF1E4993),
|
||||
lightSecondary = Color(0xFF2D60AF),
|
||||
lightAccent = Color(0xFF4993E2),
|
||||
lightPrimary = Color(0xFF1E4A94),
|
||||
lightSecondary = Color(0xFF2E61B0),
|
||||
lightAccent = Color(0xFF4A94E3),
|
||||
lightError = Color(0xFFDD1C1A),
|
||||
lightBackgroundPrimary = Color(0xFFEDF0F7),
|
||||
lightBackgroundSecondary = Color(0xFFCCD5E2),
|
||||
lightBackgroundPrimary = Color(0xFFEEF1F7),
|
||||
lightBackgroundSecondary = Color(0xFFCCD6E3),
|
||||
lightTextPrimary = Color(0xFF111111),
|
||||
lightTextSecondary = Color(0xFF444444),
|
||||
lightTextOnPrimary = Color(0xFFFFFFFF),
|
||||
|
||||
// Dark mode
|
||||
darkPrimary = Color(0xFF82B5EA),
|
||||
darkSecondary = Color(0xFF93C6F2),
|
||||
darkAccent = Color(0xFF9ED8FF),
|
||||
darkError = Color(0xFFFF5244),
|
||||
darkBackgroundPrimary = Color(0xFF12161F),
|
||||
darkBackgroundSecondary = Color(0xFF2F3848),
|
||||
darkPrimary = Color(0xFF82B5EB),
|
||||
darkSecondary = Color(0xFF94C7F2),
|
||||
darkAccent = Color(0xFF9ED9FF),
|
||||
darkError = Color(0xFFFF5344),
|
||||
darkBackgroundPrimary = Color(0xFF121720),
|
||||
darkBackgroundSecondary = Color(0xFF303849),
|
||||
darkTextPrimary = Color(0xFFF5F5F5),
|
||||
darkTextSecondary = Color(0xFFC6C6C6),
|
||||
darkTextSecondary = Color(0xFFC7C7C7),
|
||||
darkTextOnPrimary = Color(0xFFFFFFFF)
|
||||
)
|
||||
|
||||
@@ -295,26 +292,24 @@ object AppThemes {
|
||||
displayName = "Desert",
|
||||
description = "Warm terracotta and sand tones",
|
||||
|
||||
// Light mode
|
||||
lightPrimary = Color(0xFFAF6049),
|
||||
lightSecondary = Color(0xFF9E7C60),
|
||||
lightAccent = Color(0xFFD1932D),
|
||||
lightPrimary = Color(0xFFB0614A),
|
||||
lightSecondary = Color(0xFF9E7D61),
|
||||
lightAccent = Color(0xFFD1942E),
|
||||
lightError = Color(0xFFDD1C1A),
|
||||
lightBackgroundPrimary = Color(0xFFF6F0EA),
|
||||
lightBackgroundSecondary = Color(0xFFE5D8C6),
|
||||
lightBackgroundPrimary = Color(0xFFF6F1EB),
|
||||
lightBackgroundSecondary = Color(0xFFE6D9C7),
|
||||
lightTextPrimary = Color(0xFF111111),
|
||||
lightTextSecondary = Color(0xFF444444),
|
||||
lightTextOnPrimary = Color(0xFFFFFFFF),
|
||||
|
||||
// Dark mode
|
||||
darkPrimary = Color(0xFFF2B593),
|
||||
darkSecondary = Color(0xFFEAD1AF),
|
||||
darkAccent = Color(0xFFFFD86B),
|
||||
darkError = Color(0xFFFF5244),
|
||||
darkBackgroundPrimary = Color(0xFF1F1C16),
|
||||
darkBackgroundSecondary = Color(0xFF494138),
|
||||
darkPrimary = Color(0xFFF2B594),
|
||||
darkSecondary = Color(0xFFEBD1B0),
|
||||
darkAccent = Color(0xFFFFD96B),
|
||||
darkError = Color(0xFFFF5344),
|
||||
darkBackgroundPrimary = Color(0xFF201C17),
|
||||
darkBackgroundSecondary = Color(0xFF4A4138),
|
||||
darkTextPrimary = Color(0xFFF5F5F5),
|
||||
darkTextSecondary = Color(0xFFC6C6C6),
|
||||
darkTextSecondary = Color(0xFFC7C7C7),
|
||||
darkTextOnPrimary = Color(0xFFFFFFFF)
|
||||
)
|
||||
|
||||
@@ -323,26 +318,24 @@ object AppThemes {
|
||||
displayName = "Mint",
|
||||
description = "Fresh green with turquoise",
|
||||
|
||||
// Light mode
|
||||
lightPrimary = Color(0xFF38AF93),
|
||||
lightSecondary = Color(0xFF60C6AF),
|
||||
lightAccent = Color(0xFF2D9EAF),
|
||||
lightPrimary = Color(0xFF38B094),
|
||||
lightSecondary = Color(0xFF61C7B0),
|
||||
lightAccent = Color(0xFF2E9EB0),
|
||||
lightError = Color(0xFFDD1C1A),
|
||||
lightBackgroundPrimary = Color(0xFFEDF6F0),
|
||||
lightBackgroundSecondary = Color(0xFFD1E2D8),
|
||||
lightBackgroundPrimary = Color(0xFFEEF6F1),
|
||||
lightBackgroundSecondary = Color(0xFFD1E3D9),
|
||||
lightTextPrimary = Color(0xFF111111),
|
||||
lightTextSecondary = Color(0xFF444444),
|
||||
lightTextOnPrimary = Color(0xFFFFFFFF),
|
||||
|
||||
// Dark mode
|
||||
darkPrimary = Color(0xFF93F2D8),
|
||||
darkSecondary = Color(0xFFBFF9EA),
|
||||
darkAccent = Color(0xFF6BEAF2),
|
||||
darkError = Color(0xFFFF5244),
|
||||
darkBackgroundPrimary = Color(0xFF161F1F),
|
||||
darkBackgroundSecondary = Color(0xFF384949),
|
||||
darkPrimary = Color(0xFF94F2D9),
|
||||
darkSecondary = Color(0xFFBFFAEB),
|
||||
darkAccent = Color(0xFF6BEBF2),
|
||||
darkError = Color(0xFFFF5344),
|
||||
darkBackgroundPrimary = Color(0xFF172020),
|
||||
darkBackgroundSecondary = Color(0xFF384A4A),
|
||||
darkTextPrimary = Color(0xFFF5F5F5),
|
||||
darkTextSecondary = Color(0xFFC6C6C6),
|
||||
darkTextSecondary = Color(0xFFC7C7C7),
|
||||
darkTextOnPrimary = Color(0xFFFFFFFF)
|
||||
)
|
||||
|
||||
|
||||
@@ -2,92 +2,141 @@ package com.tt.honeyDue.ui.theme
|
||||
|
||||
import androidx.compose.material3.Typography
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.sp
|
||||
|
||||
// Modern Typography Scale - Matching iOS Design System
|
||||
/**
|
||||
* Modern Typography Scale — matches iOS Design System.
|
||||
*
|
||||
* Target: iOS `.system(..., design: .rounded)` which is SF Pro Rounded on
|
||||
* Apple platforms. On Android Compose we fall back to [FontFamily.SansSerif]
|
||||
* — the system sans-serif (Roboto on Android) — which has a comparable
|
||||
* geometric feel and is always available without shipping custom fonts.
|
||||
*
|
||||
* Sizes are aligned with iOS dynamic-type defaults at the large accessibility
|
||||
* tier:
|
||||
*
|
||||
* | Compose token | iOS UIFont.TextStyle | sp |
|
||||
* |--------------------|----------------------|------|
|
||||
* | displayLarge | — | 57 |
|
||||
* | displayMedium | — | 45 |
|
||||
* | displaySmall | — | 36 |
|
||||
* | headlineLarge | largeTitle (-2) | 32 |
|
||||
* | headlineMedium | title1 | 28 |
|
||||
* | headlineSmall | title2 (+2) | 24 |
|
||||
* | titleLarge | title2 | 22 |
|
||||
* | titleMedium | title3 | 18 |
|
||||
* | titleSmall | headline (-1) | 16 |
|
||||
* | bodyLarge | body | 17 |
|
||||
* | bodyMedium | callout | 15 |
|
||||
* | bodySmall | footnote | 13 |
|
||||
* | labelLarge | subheadline (-1) | 14 |
|
||||
* | labelMedium | caption1 | 12 |
|
||||
* | labelSmall | caption2 | 11 |
|
||||
*
|
||||
* Parity is exercised by
|
||||
* `composeApp/src/commonTest/kotlin/com/tt/honeyDue/ui/theme/TypographyTest.kt`.
|
||||
*/
|
||||
private val DefaultFontFamily = FontFamily.SansSerif
|
||||
|
||||
val AppTypography = Typography(
|
||||
// Display - For hero sections
|
||||
// Display — hero sections
|
||||
displayLarge = TextStyle(
|
||||
fontFamily = DefaultFontFamily,
|
||||
fontSize = 57.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
lineHeight = 64.sp
|
||||
),
|
||||
displayMedium = TextStyle(
|
||||
fontFamily = DefaultFontFamily,
|
||||
fontSize = 45.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
lineHeight = 52.sp
|
||||
),
|
||||
displaySmall = TextStyle(
|
||||
fontFamily = DefaultFontFamily,
|
||||
fontSize = 36.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
lineHeight = 44.sp
|
||||
),
|
||||
|
||||
// Headline - For section headers
|
||||
// Headline — section headers
|
||||
headlineLarge = TextStyle(
|
||||
fontFamily = DefaultFontFamily,
|
||||
fontSize = 32.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
lineHeight = 40.sp
|
||||
),
|
||||
headlineMedium = TextStyle(
|
||||
fontSize = 28.sp,
|
||||
fontFamily = DefaultFontFamily,
|
||||
fontSize = 28.sp, // iOS title1
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
lineHeight = 36.sp
|
||||
),
|
||||
headlineSmall = TextStyle(
|
||||
fontFamily = DefaultFontFamily,
|
||||
fontSize = 24.sp,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
lineHeight = 32.sp
|
||||
),
|
||||
|
||||
// Title - For card titles
|
||||
// Title — card titles
|
||||
titleLarge = TextStyle(
|
||||
fontSize = 22.sp,
|
||||
fontFamily = DefaultFontFamily,
|
||||
fontSize = 22.sp, // iOS title2
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
lineHeight = 28.sp
|
||||
),
|
||||
titleMedium = TextStyle(
|
||||
fontFamily = DefaultFontFamily,
|
||||
fontSize = 18.sp,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
lineHeight = 24.sp
|
||||
),
|
||||
titleSmall = TextStyle(
|
||||
fontFamily = DefaultFontFamily,
|
||||
fontSize = 16.sp,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
lineHeight = 20.sp
|
||||
),
|
||||
|
||||
// Body - For main content
|
||||
// Body — main content
|
||||
bodyLarge = TextStyle(
|
||||
fontSize = 17.sp,
|
||||
fontFamily = DefaultFontFamily,
|
||||
fontSize = 17.sp, // iOS body
|
||||
fontWeight = FontWeight.Normal,
|
||||
lineHeight = 24.sp
|
||||
),
|
||||
bodyMedium = TextStyle(
|
||||
fontSize = 15.sp,
|
||||
fontFamily = DefaultFontFamily,
|
||||
fontSize = 15.sp, // iOS callout
|
||||
fontWeight = FontWeight.Normal,
|
||||
lineHeight = 20.sp
|
||||
),
|
||||
bodySmall = TextStyle(
|
||||
fontSize = 13.sp,
|
||||
fontFamily = DefaultFontFamily,
|
||||
fontSize = 13.sp, // iOS footnote
|
||||
fontWeight = FontWeight.Normal,
|
||||
lineHeight = 16.sp
|
||||
),
|
||||
|
||||
// Label - For labels and captions
|
||||
// Label — labels and captions
|
||||
labelLarge = TextStyle(
|
||||
fontFamily = DefaultFontFamily,
|
||||
fontSize = 14.sp,
|
||||
fontWeight = FontWeight.Medium,
|
||||
lineHeight = 20.sp
|
||||
),
|
||||
labelMedium = TextStyle(
|
||||
fontSize = 12.sp,
|
||||
fontFamily = DefaultFontFamily,
|
||||
fontSize = 12.sp, // iOS caption1
|
||||
fontWeight = FontWeight.Medium,
|
||||
lineHeight = 16.sp
|
||||
),
|
||||
labelSmall = TextStyle(
|
||||
fontSize = 11.sp,
|
||||
fontFamily = DefaultFontFamily,
|
||||
fontSize = 11.sp, // iOS caption2
|
||||
fontWeight = FontWeight.Medium,
|
||||
lineHeight = 16.sp
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user