Color Palette
The application uses a carefully crafted color scheme that evokes medieval scrolls and adventure:Color Usage
| Color | Hex | Usage |
|---|---|---|
| Forest | #2C4432 | Primary buttons, icons, app bar icons, borders |
| Ember | #8C3C2F | Secondary actions, warnings, highlights |
| Brass | #C9953E | Focused inputs, accents, badges, selected states |
| Parchment | #EDE3C8 | Main background, scaffold background |
| Panel | #F8F2DE | Card surfaces, input fields, app bar background |
| Ink | #211A16 | Body text, headings, foreground text |
Material 3 Theme
The app uses Material 3 with custom color schemes and component themes:Theme Configuration
The_buildTheme() method in main.dart returns a fully configured ThemeData:
Typography
The application uses a serif font family for a classic, manuscript-like appearance:Text Styles
- Body text: Serif font in ink color (
#211A16) - Headings: Bold serif with increased letter spacing
- Buttons: Bold serif with moderate letter spacing (0.2-0.3)
- App bar titles: 22pt, bold, slight letter spacing
Custom Text Theme
Component Themes
AppBar
- Background: Panel color (
#F8F2DE) - Text: Ink color (
#211A16) - Icons: Forest green (
#2C4432) - Elevation: 0 (flat design)
- Title: 22pt bold serif
Cards
- Background: Off-white (
#FFFAF0) - Border: Forest green with 22% opacity
- Border radius: 20px (rounded)
- Elevation: 0 (flat with border)
Buttons
All buttons use 14px border radius for consistent rounded corners.FilledButton
- Background: Forest green
- Text: Panel color (light)
- Font: Bold serif
ElevatedButton
- Background: Forest green
- Text: Panel color (light)
- Elevation: 0
- Font: Bold serif
OutlinedButton
- Border: Forest green (50% opacity)
- Text: Forest green
- Font: Bold serif
Input Fields
- Background: Panel color (
#F8F2DE) - Border: Forest green with varying opacity
- Enabled: 25% opacity
- Default: 35% opacity
- Focused: Brass color, 1.4px width
- Border radius: 14px
- Label: Muted brown (
#4A413A)
Gradients
The app uses gradients for visual depth:Home Screen Background
App Bar Gradient (Dark)
Navigation Bar
Design Tokens
Border Radius
- Cards: 20px
- Buttons: 14px
- Input fields: 14px
- Navigation bar: 24px
- Badges: 999px (fully rounded)
Spacing
- Card padding: 24px
- Input padding: 14px horizontal, 14px vertical
- Navigation bar padding: 14px (sides and bottom)
- Section gaps: 8-14px
Elevation
- Cards: 0 (use borders instead)
- AppBar: 0 (flat)
- Buttons: 0 (flat with solid backgrounds)
- Shadows: Used sparingly for floating elements
Custom Components
The theme is applied consistently, but some screens use custom decorations:Glow Orbs (Setup Screen)
Badge/Label
Accessibility
Color Contrast
All text colors meet WCAG AA standards:- Ink on parchment: High contrast (dark on light)
- Panel text: Readable against panel backgrounds
- Button text: Light on dark (forest green)
Interactive Elements
- Minimum touch target: 48x48 dp (Material Design standard)
- Clear focus states with brass borders
- Icon buttons with sufficient padding
Dark Mode
To add dark mode:- Create a
_buildDarkTheme()method - Use darker background colors (browns, deep greens)
- Adjust text colors for dark backgrounds
- Set
ThemeMode.systemin MaterialApp
Best Practices
Use theme colors instead of hardcoding
Access theme in widgets via
Theme.of(context)Use
ColorScheme colors for consistencyNext Steps
Architecture
Learn about the app architecture
Project Structure
Explore the codebase organization