Theme Structure
The generated theme consists of three main components:- Colors - Color palette for light and dark modes
- Typography - Text styles and font definitions
- Theme Composable - Main theme wrapper with configuration
Color Customization
Color System
Lumo UI uses a comprehensive color system with support for both light and dark modes. TheColors data class defines all color tokens:
Color.kt
Predefined Color Palettes
Lumo UI includes predefined color values organized by color family:Light and Dark Color Schemes
Define separate color schemes for light and dark modes:Customizing Colors
To customize colors, edit theLightColors and DarkColors definitions in your Color.kt file:
Custom Brand Colors
Accessing Colors in Components
Access theme colors in your composables using the theme object:Using Theme Colors
Typography Customization
Typography System
Lumo UI provides a comprehensive typography system with 12 text styles:Typography.kt
Default Text Styles
Here are the default text style definitions:View Default Typography Styles
View Default Typography Styles
Default Typography
Custom Font Family
To use a custom font family, define it in your Typography file:Applying Font Family to Typography
Apply your custom font family to all text styles:provideTypography
Using Typography in Components
Access typography styles through the theme:Using Typography
Font Scaling
Lumo UI supports dynamic font scaling for accessibility:Font Scaling
Theme Composable
The main theme composable wraps your app content and provides theme values:Theme.kt
Using the Theme
Wrap your app content with the theme composable:Application Setup
Dynamic Theme Updates
You can create dynamic theme updates by modifying theAppColors data class:
Dynamic Colors
Best Practices
Use Semantic Color Names
Use Semantic Color Names
Always use semantic color tokens (like
primary, error, surface) instead of hardcoding colors. This ensures consistency and makes theme switching easier.Maintain Color Contrast
Maintain Color Contrast
Ensure sufficient contrast between colors, especially for text. Use the
onX color tokens for text on colored backgrounds:Test Both Light and Dark Modes
Test Both Light and Dark Modes
Always test your UI in both light and dark modes to ensure colors work well in both contexts.
Use Typography Styles Consistently
Use Typography Styles Consistently
Stick to the predefined typography styles for consistency. Only create custom styles when absolutely necessary.
Next Steps
lumo.properties
Configure the plugin settings
Directory Structure
Understand the project structure