원클릭으로
kmp-theming
Compose MaterialTheme patterns: Color.kt, Typography, darkColorScheme, and TV-specific theming for KMP apps
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Compose MaterialTheme patterns: Color.kt, Typography, darkColorScheme, and TV-specific theming for KMP apps
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Template repo file structure: where screens, navigation, theme, data, and platform entries live in the monorepo
Android TV build and D-pad QA using Android CLI first, with bounded Gradle and ADB fallbacks
Expo Application Services cloud build configuration for TV app APK and IPA generation
Expo TV configuration: app.json plugins, prebuild settings, platform-specific config for react-native-tvos
Fire TV leanback manifest configuration: banner icons, LEANBACK_LAUNCHER intent filter, TV-specific Android settings
Gradle build commands: assembleDebug, assembleRelease, APK output paths, and emulator installation
| name | kmp-theming |
| description | Compose MaterialTheme patterns: Color.kt, Typography, darkColorScheme, and TV-specific theming for KMP apps |
| applies_to | ["branding","screens"] |
| load_when | applying brand colors, creating/editing theme, or any color/typography request |
Theme lives in
androidtv-app/src/main/java/com/kmptv/androidtv/theme/. A brand kit becomes a theme via darkColorScheme() customization plus a parallel KmptvColors object for TV-specific surfaces.
androidtv-app/src/main/java/com/kmptv/androidtv/theme/
├── Color.kt # KmptvColors object — TV-specific palette outside MaterialTheme
├── Theme.kt # KMPTVTheme composable wrapping darkColorScheme()
└── Type.kt # Typography definitions
The template uses two complementary color approaches:
private val DarkColorScheme = darkColorScheme(
primary = Color(0xFF90CAF9), // CTAs, active states
secondary = Color(0xFF81C784), // Secondary actions
tertiary = Color(0xFFFFB74D), // Accents, highlights
background = Color(0xFF0D0D0D), // App background
surface = Color(0xFF1E1E1E), // Card surfaces
onPrimary = Color(0xFF000000), // Text on primary
onSecondary = Color(0xFF000000),
onTertiary = Color(0xFF000000),
onBackground = Color(0xFFFFFFFF), // Body text
onSurface = Color(0xFFFFFFFF), // Text on cards
)
Access via MaterialTheme.colorScheme.primary, etc.
object KmptvColors {
val Background = Color(0xFF0D0D0D) // Near-black, avoids LCD haloing
val SurfaceElevated = Color(0xFF1A1A1A) // Panels above background
val SurfaceFocus = Color(0xFF2A2A2A) // Unfocused controls
val Accent = Color(0xFFE50914) // Seek-bar, progress (brand red)
}
Direct reference: KmptvColors.Background. Used where MaterialTheme semantics don't map well to TV patterns (hero gradients, player controls, surface hierarchy).
To rebrand the app:
Color.kt — change KmptvColors values to match the brand palette.Theme.kt — update darkColorScheme() parameters.KmptvColors.Background should match background in the scheme.| Brand field | Goes to | Notes |
|---|---|---|
primary_color | darkColorScheme(primary = ...) | CTAs, active states |
accent_color | KmptvColors.Accent + tertiary | Focus highlights, progress bars |
background_color | Both background and KmptvColors.Background | Must be identical |
font_family | Type.kt font family | Use Google Fonts or system |
val Typography = Typography(
headlineLarge = TextStyle(
fontWeight = FontWeight.Bold,
fontSize = 48.sp,
lineHeight = 56.sp,
),
titleMedium = TextStyle(
fontWeight = FontWeight.SemiBold,
fontSize = 20.sp,
),
bodyLarge = TextStyle(
fontSize = 24.sp,
lineHeight = 32.sp,
),
bodyMedium = TextStyle(
fontSize = 18.sp,
lineHeight = 24.sp,
),
labelSmall = TextStyle(
fontSize = 12.sp,
),
)
headlineLarge.TV apps default dark. The template only defines darkColorScheme() — no light variant. Rationale:
If a brand requires light mode, you would need to add a lightColorScheme() and a mode toggle. This is rare for TV.
Focus visibility is critical at 10 feet. The template uses:
.border(2.dp, Color.White, shape)When rebranding, ensure:
The template uses a 3-level dark surface system:
Background (0xFF0D0D0D) — page backgroundSurfaceElevated (0xFF1A1A1A) — cards, panelsSurfaceFocus (0xFF2A2A2A) — interactive elements at restEach level is subtly lighter than the previous. This creates depth without bright colors.
The hero banner uses overlays for text legibility:
These ensure text is always readable regardless of the background image.
KmptvColors or MaterialTheme.colorScheme. Scattered hex codes break theming.KmptvColors, one darkColorScheme(). Consistency comes from centralization.