kernel/gui/themes.h) but incomplete: MayteraOS ships 14 built-in themes today, not 5. (2) The on-disk theme format described in "Theme System Overview" is wrong: themes are not /THEMES/<name>/theme.ini directories, they are flat /THEMES/*.mtheme files (one per theme, plain "key=value" text), per kernel/gui/themes.c. The rest of this guide (color tokens, typography, spacing, component specs) was not individually re-checked in this pass; treat it as unverified rather than confirmed current.MayteraOS UI Style Guide
Version: 1.0 Last Updated: 2026-01-29 Author: UI Lead / Art Director
Table of Contents
- Design Philosophy
- Theme System Overview
- Color Palettes
- Typography
- Spacing and Layout Grid
- Component Specifications
- Icon Style Guidelines
- Animation Guidelines
- Accessibility
- Implementation Reference
1. Design Philosophy
Default: 1990s UNIX Aesthetic
MayteraOS defaults to a CDE/Motif-inspired visual language reminiscent of classic UNIX workstations (CDE, NeXTSTEP, early IRIX, Solaris). This aesthetic prioritizes:
- Functional over flashy - Every visual element serves a purpose
- Beveled 3D elements - Raised buttons, sunken input fields, clear depth hierarchy
- Muted color palettes - Grays, tans, muted blues; no harsh saturated colors
- Pixel-perfect borders - Clean 1-2px borders with highlight/shadow pairs
- Information density - Efficient use of screen real estate
- Predictable behavior - Visual affordances clearly communicate interactivity
Theme Variants
While the default is retro UNIX, MayteraOS supports modern themes:
| Theme | Inspiration | Use Case |
|---|---|---|
| retro-unix (default) | CDE/Motif/NeXTSTEP | Nostalgic, power users, low-resource systems |
| modern-light | macOS 11+ (Big Sur+) | Modern light environment users |
| modern-dark | macOS 11+ Dark Mode | Modern dark environment users |
| fluent-light | Windows 11 Fluent | Windows-familiar users |
| fluent-dark | Windows 11 Dark Mode | Windows-familiar dark mode users |
2. Theme System Overview
Architecture (corrected)
Themes in MayteraOS are defined in flat /THEMES/<name>.mtheme files,
one file per theme (plain text, key=value lines), and loaded by the
kernel's theme system (kernel/gui/themes.c). There is no per-theme
subdirectory and no theme.ini; the layout below describes an earlier,
superseded design.
Theme File Structure (superseded, kept for history)
/THEMES/
retro-unix/
theme.ini # Color and style definitions
wallpapers/ # Theme-specific wallpapers (optional)
icons/ # Theme-specific icon overrides (optional)
sounds/ # Theme-specific sounds (optional)
modern-light/
theme.ini
...
What actually ships is flatter:
/THEMES/
RETRO_UNIX.mtheme
MODERN_LIGHT.mtheme
MODERN_DARK.mtheme
FLUENT_LIGHT.mtheme
FLUENT_DARK.mtheme
... 9 more, 14 total
Theme.ini Format
See Section 10: Implementation Reference for the complete theme.ini specification. Note this describes the superseded format above, not the shipping .mtheme key=value format.
3. Color Palettes
3.1 Retro UNIX Theme (Default)
Based on CDE's default "Crimson" and "Neptune" color schemes with influences from NeXTSTEP's grayscale elegance.
Primary Colors
| Token | Hex | RGB | Usage |
|---|---|---|---|
base-bg | #AEB2C3 | 174, 178, 195 | Window backgrounds, panel backgrounds |
base-fg | #000000 | 0, 0, 0 | Primary text |
accent | #4B6983 | 75, 105, 131 | Active titlebar, selections |
accent-secondary | #8B8682 | 139, 134, 130 | Inactive elements |
Window Chrome
| Token | Hex | RGB | Usage |
|---|---|---|---|
titlebar-active | #4B6983 | 75, 105, 131 | Active window titlebar |
titlebar-inactive | #8B8682 | 139, 134, 130 | Inactive window titlebar |
titlebar-text | #FFFFFF | 255, 255, 255 | Titlebar text (active) |
titlebar-text-inactive | #D0D0D0 | 208, 208, 208 | Titlebar text (inactive) |
border-light | #DCDAD5 | 220, 218, 213 | 3D highlight (top/left) |
border-dark | #565248 | 86, 82, 72 | 3D shadow (bottom/right) |
border-outline | #000000 | 0, 0, 0 | Outer 1px border |
Widget Colors
| Token | Hex | RGB | Usage |
|---|---|---|---|
button-bg | #C0C0C0 | 192, 192, 192 | Button face |
button-highlight | #FFFFFF | 255, 255, 255 | Button 3D highlight |
button-shadow | #808080 | 128, 128, 128 | Button 3D shadow |
button-text | #000000 | 0, 0, 0 | Button label |
input-bg | #FFFFFF | 255, 255, 255 | Text input background |
input-border | #808080 | 128, 128, 128 | Input field border |
scrollbar-trough | #A0A0A0 | 160, 160, 160 | Scrollbar track |
scrollbar-thumb | #C0C0C0 | 192, 192, 192 | Scrollbar handle |
Semantic Colors
| Token | Hex | RGB | Usage |
|---|---|---|---|
selection-bg | #4B6983 | 75, 105, 131 | Selected text/items |
selection-fg | #FFFFFF | 255, 255, 255 | Selected text color |
error | #CC0000 | 204, 0, 0 | Error states |
warning | #C4A000 | 196, 160, 0 | Warning states |
success | #4E9A06 | 78, 154, 6 | Success states |
disabled-fg | #808080 | 128, 128, 128 | Disabled text |
disabled-bg | #D4D4D4 | 212, 212, 212 | Disabled backgrounds |
Desktop and Taskbar
| Token | Hex | RGB | Usage |
|---|---|---|---|
desktop-bg | #5F7B97 | 95, 123, 151 | Desktop background (if no wallpaper) |
taskbar-bg | #C0C0C0 | 192, 192, 192 | Taskbar/panel background |
taskbar-active | #4B6983 | 75, 105, 131 | Active task button |
start-button | #C0C0C0 | 192, 192, 192 | Start/menu button |
3.2 Modern Light Theme (macOS-inspired)
Clean, airy aesthetic with subtle shadows and rounded corners.
Primary Colors
| Token | Hex | RGB | Usage |
|---|---|---|---|
base-bg | #FFFFFF | 255, 255, 255 | Window backgrounds |
base-fg | #1D1D1F | 29, 29, 31 | Primary text |
accent | #007AFF | 0, 122, 255 | System accent (blue) |
accent-secondary | #5856D6 | 88, 86, 214 | Secondary accent (purple) |
Window Chrome
| Token | Hex | RGB | Usage |
|---|---|---|---|
titlebar-active | #E8E8E8 | 232, 232, 232 | Active titlebar (translucent) |
titlebar-inactive | #F6F6F6 | 246, 246, 246 | Inactive titlebar |
titlebar-text | #1D1D1F | 29, 29, 31 | Titlebar text |
window-shadow | rgba(0,0,0,0.2) | - | Window drop shadow |
border | #D1D1D6 | 209, 209, 214 | Subtle border |
Traffic Light Buttons
| Token | Hex | RGB | Usage |
|---|---|---|---|
close-button | #FF5F57 | 255, 95, 87 | Close button (red) |
minimize-button | #FFBD2E | 255, 189, 46 | Minimize button (yellow) |
maximize-button | #28C840 | 40, 200, 64 | Maximize button (green) |
button-inactive | #DCDCDC | 220, 220, 220 | Inactive window buttons |
Widget Colors
| Token | Hex | RGB | Usage |
|---|---|---|---|
button-bg | #FFFFFF | 255, 255, 255 | Button background |
button-border | #D1D1D6 | 209, 209, 214 | Button border |
button-hover | #F5F5F7 | 245, 245, 247 | Button hover |
button-pressed | #E5E5EA | 229, 229, 234 | Button pressed |
input-bg | #FFFFFF | 255, 255, 255 | Input background |
input-border | #D1D1D6 | 209, 209, 214 | Input border |
scrollbar-thumb | rgba(0,0,0,0.3) | - | Scrollbar (overlay style) |
3.3 Modern Dark Theme (macOS Dark-inspired)
Primary Colors
| Token | Hex | RGB | Usage |
|---|---|---|---|
base-bg | #1E1E1E | 30, 30, 30 | Window backgrounds |
base-fg | #FFFFFF | 255, 255, 255 | Primary text |
accent | #0A84FF | 10, 132, 255 | System accent (blue) |
surface | #2D2D2D | 45, 45, 45 | Elevated surfaces |
Window Chrome
| Token | Hex | RGB | Usage |
|---|---|---|---|
titlebar-active | #3A3A3C | 58, 58, 60 | Active titlebar |
titlebar-inactive | #2D2D2D | 45, 45, 45 | Inactive titlebar |
titlebar-text | #FFFFFF | 255, 255, 255 | Titlebar text |
border | #3D3D3D | 61, 61, 61 | Subtle border |
Widget Colors
| Token | Hex | RGB | Usage |
|---|---|---|---|
button-bg | #3A3A3C | 58, 58, 60 | Button background |
button-hover | #48484A | 72, 72, 74 | Button hover |
button-text | #FFFFFF | 255, 255, 255 | Button text |
input-bg | #1C1C1E | 28, 28, 30 | Input background |
3.4 Fluent Light Theme (Windows 11-inspired)
Microsoft Fluent Design with Mica-like materials.
Primary Colors
| Token | Hex | RGB | Usage |
|---|---|---|---|
base-bg | #F3F3F3 | 243, 243, 243 | Window backgrounds |
base-fg | #1A1A1A | 26, 26, 26 | Primary text |
accent | #0078D4 | 0, 120, 212 | System accent (blue) |
mica | rgba(255,255,255,0.7) | - | Mica material background |
Window Chrome
| Token | Hex | RGB | Usage |
|---|---|---|---|
titlebar-active | #F0F0F0 | 240, 240, 240 | Active titlebar |
titlebar-inactive | #F8F8F8 | 248, 248, 248 | Inactive titlebar |
titlebar-text | #1A1A1A | 26, 26, 26 | Titlebar text |
border | #E5E5E5 | 229, 229, 229 | Window border |
Window Buttons (Right-aligned)
| Token | Hex | RGB | Usage |
|---|---|---|---|
close-hover | #E81123 | 232, 17, 35 | Close button hover |
close-pressed | #F1707A | 241, 112, 122 | Close button pressed |
control-hover | #E5E5E5 | 229, 229, 229 | Min/Max hover |
Widget Colors
| Token | Hex | RGB | Usage |
|---|---|---|---|
button-bg | #FDFDFD | 253, 253, 253 | Button background |
button-border | #D6D6D6 | 214, 214, 214 | Button border |
button-hover | #F9F9F9 | 249, 249, 249 | Button hover |
input-bg | #FFFFFF | 255, 255, 255 | Input background |
input-border | #8A8A8A | 138, 138, 138 | Input border (bottom) |
3.5 Fluent Dark Theme (Windows 11 Dark-inspired)
Primary Colors
| Token | Hex | RGB | Usage |
|---|---|---|---|
base-bg | #202020 | 32, 32, 32 | Window backgrounds |
base-fg | #FFFFFF | 255, 255, 255 | Primary text |
accent | #60CDFF | 96, 205, 255 | System accent (light blue) |
surface | #2D2D2D | 45, 45, 45 | Cards/elevated surfaces |
Window Chrome
| Token | Hex | RGB | Usage |
|---|---|---|---|
titlebar-active | #202020 | 32, 32, 32 | Active titlebar |
titlebar-inactive | #1F1F1F | 31, 31, 31 | Inactive titlebar |
titlebar-text | #FFFFFF | 255, 255, 255 | Titlebar text |
border | #3D3D3D | 61, 61, 61 | Window border |
4. Typography
Font Stack
MayteraOS uses a layered font stack prioritizing system fonts for performance:
Retro UNIX Theme
Primary: "Fixed", "Terminus", "DejaVu Sans Mono", monospace
UI Labels: "Helvetica", "Liberation Sans", "Arial", sans-serif
The retro theme favors bitmap fonts at small sizes (typically 10-12pt) for authentic appearance.
Modern Themes
Primary: "SF Pro Display", "SF Pro Text", "Segoe UI", "Helvetica Neue", sans-serif
Monospace: "SF Mono", "Cascadia Code", "Consolas", "DejaVu Sans Mono", monospace
Type Scale
| Level | Size (px) | Weight | Line Height | Usage |
|---|---|---|---|---|
title-large | 20 | Semi-Bold (600) | 28px | Window titles (modern themes) |
title | 14 | Semi-Bold (600) | 20px | Window titles (retro), section headers |
body | 13 | Regular (400) | 18px | Primary body text |
body-small | 11 | Regular (400) | 16px | Secondary text, labels |
caption | 10 | Regular (400) | 14px | Captions, tooltips |
mono | 12 | Regular (400) | 16px | Code, terminal text |
Font Rendering
| Theme | Anti-aliasing | Hinting |
|---|---|---|
| retro-unix | None (bitmap) or Light | Full |
| modern-* | Subpixel | Light |
| fluent-* | Subpixel | Light |
5. Spacing and Layout Grid
Base Unit
All spacing in MayteraOS is based on a 4px base unit.
4px = 1 unit (xs)
8px = 2 units (sm)
12px = 3 units (md)
16px = 4 units (lg)
24px = 6 units (xl)
32px = 8 units (2xl)
Window Dimensions
Retro UNIX Theme
| Element | Value | Notes |
|---|---|---|
| Titlebar height | 20px | Classic Motif height |
| Border width | 2px | 3D beveled border |
| Close button | 16x16px | Square with X glyph |
| Min/Max buttons | 16x16px | Square icons |
| Button spacing | 2px | Between titlebar buttons |
| Content padding | 8px | Inside window content area |
| Resize grip | 10x10px | Corner resize handle |
Modern Themes
| Element | Value | Notes |
|---|---|---|
| Titlebar height | 28px | Taller for touch-friendly |
| Border width | 1px | Subtle border |
| Corner radius | 10px | Rounded corners |
| Traffic lights | 12x12px | Circular buttons |
| Button spacing | 8px | Between traffic lights |
| Content padding | 16px | More generous spacing |
| Shadow | 0 10px 30px rgba(0,0,0,0.15) | Soft drop shadow |
Fluent Themes
| Element | Value | Notes |
|---|---|---|
| Titlebar height | 32px | Windows 11 standard |
| Border width | 1px | Thin border |
| Corner radius | 8px | Slightly rounded |
| Control buttons | 46x32px | Wide rectangular buttons |
| Content padding | 12px | Standard padding |
| Shadow | 0 8px 16px rgba(0,0,0,0.14) | Elevation shadow |
Layout Grid
Desktop Grid
- Grid cell size: 80x80px (retro), 90x90px (modern)
- Icon spacing: 16px between icons
- Desktop margin: 16px from screen edges
Window Content Grid
- Column width: Fluid, based on window width
- Gutter: 16px between columns
- Maximum content width: None (fill available)
6. Component Specifications
6.1 Buttons
Retro UNIX (Motif-style 3D Button)
+------------------------------------------+
| highlight (1px) - #FFFFFF |
| +--------------------------------------+ |
| | | |
| | BUTTON LABEL | |
| | | |
| +--------------------------------------+ |
| shadow (1px) - #808080
+------------------------------------------+
outer shadow (1px) - #404040
Specifications:
- Height: 24px (standard), 20px (compact)
- Min width: 75px
- Padding: 8px horizontal, 4px vertical
- Border: 2px 3D beveled (highlight top/left, shadow bottom/right)
- Corner radius: 0px (square)
States: | State | Background | Border | Text | |-------|------------|--------|------| | Normal | #C0C0C0 | 3D raised | #000000 | | Hover | #D0D0D0 | 3D raised | #000000 | | Pressed | #A0A0A0 | 3D sunken (inverted) | #000000 | | Disabled | #C0C0C0 | Flat gray | #808080 | | Focused | #C0C0C0 | + 1px dotted inner | #000000 |
Modern Themes (macOS-style)
Specifications:
- Height: 28px (standard), 22px (small)
- Min width: 64px
- Padding: 12px horizontal, 6px vertical
- Border: 1px solid + subtle shadow
- Corner radius: 6px
States: | State | Background | Border | Shadow | |-------|------------|--------|--------| | Normal | #FFFFFF | #D1D1D6 | 0 1px 2px rgba(0,0,0,0.05) | | Hover | #F5F5F7 | #C8C8CC | 0 1px 3px rgba(0,0,0,0.08) | | Pressed | #E5E5EA | #BEBEC2 | inset 0 1px 2px rgba(0,0,0,0.05) | | Primary | #007AFF | none | 0 1px 3px rgba(0,122,255,0.3) |
Fluent Themes (Windows 11-style)
Specifications:
- Height: 32px
- Min width: 96px
- Padding: 12px horizontal
- Border: 1px solid (bottom 1px darker)
- Corner radius: 4px
States: | State | Background | Border | |-------|------------|--------| | Normal | #FDFDFD | #D6D6D6 + bottom #A0A0A0 | | Hover | #F9F9F9 | Same | | Pressed | #F0F0F0 | Same | | Accent | #0078D4 | Subtle dark |
6.2 Scrollbars
Retro UNIX (Always visible, substantial)
+---+
| ^ | <- Arrow button (16x16)
+---+
| |
| # | <- Thumb (draggable)
| |
+---+
| v | <- Arrow button
+---+
Specifications:
- Width: 16px
- Arrow buttons: 16x16px with 3D beveling
- Thumb: Min 20px height, 3D raised
- Trough: Sunken 3D appearance
Modern Themes (Overlay scrollbars)
Specifications:
- Width: 8px (expanded on hover: 12px)
- No arrow buttons
- Thumb: Rounded, semi-transparent
- Trough: Transparent until hover
Fluent Themes (Thin, revealed on scroll)
Specifications:
- Width: 6px (expanded: 12px)
- Thumb: 2px corner radius
- Auto-hide: Fades after 2 seconds idle
6.3 Menus
Retro UNIX (Motif-style popup)
Specifications:
- Background:
#C0C0C0 - Border: 2px 3D raised
- Item height: 20px
- Item padding: 8px horizontal
- Separator: 1px sunken line with 4px margin
- Submenu arrow:
>character, right-aligned
Item States: | State | Background | Text | |-------|------------|------| | Normal | Transparent | #000000 | | Hover | #4B6983 | #FFFFFF | | Disabled | Transparent | #808080 |
Modern Themes
Specifications:
- Background:
#FFFFFFwith shadow - Border: None (shadow provides edge)
- Corner radius: 6px
- Item height: 28px
- Item padding: 12px horizontal
- Icon area: 24px left margin for checkmarks/icons
Fluent Themes
Specifications:
- Background: Semi-transparent with Acrylic blur
- Border: 1px
#E5E5E5 - Corner radius: 8px
- Item height: 36px
- Flyout animation: 100ms ease-out
6.4 Checkboxes and Radio Buttons
Retro UNIX
Checkbox:
- Size: 13x13px
- Border: 2px sunken 3D
- Checkmark: X or checkmark glyph in black
- Label spacing: 4px
Radio Button:
- Size: 13x13px (circular)
- Border: 2px sunken 3D
- Indicator: Filled circle 7px
Modern Themes
Checkbox:
- Size: 16x16px
- Border: 1px
#D1D1D6 - Corner radius: 4px
- Checked: Blue fill with white checkmark
Fluent Themes
Checkbox:
- Size: 20x20px
- Border: 1px
#8A8A8A - Corner radius: 4px
- Checked: Accent color fill with white checkmark
6.5 Text Inputs
Retro UNIX
Specifications:
- Height: 22px
- Border: 2px sunken 3D
- Background:
#FFFFFF - Padding: 4px
- Cursor: Block cursor (black)
Modern Themes
Specifications:
- Height: 28px
- Border: 1px
#D1D1D6 - Corner radius: 6px
- Background:
#FFFFFF - Padding: 8px
- Focus: Blue border
#007AFF
Fluent Themes
Specifications:
- Height: 32px
- Border: 1px (bottom 2px accent on focus)
- Corner radius: 4px
- Focus: Bottom border changes to accent color
6.6 Window Title Bars
Retro UNIX
+========================================================+
| [#] Window Title [_] [O] [X] |
+========================================================+
- Height: 20px
- Gradient: None (solid color)
- Title: Left-aligned, 4px from icon
- Buttons: Right-aligned, 16x16px each
- Icon: 16x16px app icon (optional)
Modern Themes
+----------------------------------------------------------+
| (O) (O) (O) Window Title |
+----------------------------------------------------------+
- Height: 28px
- Buttons: Left-aligned traffic lights (macOS style)
- Title: Centered
- Background: Semi-transparent (vibrancy)
Fluent Themes
+----------------------------------------------------------+
| [icon] Window Title [_] [O] [X] |
+----------------------------------------------------------+
- Height: 32px
- Buttons: Right-aligned, wide buttons
- Title: Left-aligned with app icon
- Background: Mica material effect
7. Icon Style Guidelines
Retro UNIX Icons
Characteristics:
- Size: 32x32px (standard), 16x16px (small)
- Color depth: 16-256 colors
- Style: Flat with minimal gradients, 1px black outline
- Perspective: Front-facing, 2D
- No drop shadows on icons
Inspiration: CDE icons, early GNOME, NeXTSTEP
Modern Theme Icons
Characteristics:
- Size: 32x32px, 64x64px, 128x128px
- Style: SF Symbols-inspired, outlined or filled
- Stroke weight: 2px for outlined style
- Colors: Monochrome with accent color highlights
- Soft drop shadows optional
Fluent Theme Icons
Characteristics:
- Size: 16x16, 20x20, 24x24, 32x32, 48x48px
- Style: Fluent System Icons - outlined by default
- Stroke weight: 1.5px
- Colors: Single color, system accent
- No gradients or shadows
Icon Grid
All icons should be designed on a pixel grid:
- 16px icons: 14px safe area, 1px padding
- 32px icons: 28px safe area, 2px padding
- 64px icons: 56px safe area, 4px padding
8. Animation Guidelines
General Principles
- Purpose over decoration - Animations should provide feedback, not distraction
- Quick and responsive - Most animations < 200ms
- Respect reduced motion - Provide static alternatives
Retro UNIX Theme
Approach: Minimal to no animation
- Window open/close: Instant (no animation)
- Button press: Immediate visual state change
- Menu appearance: Instant
Modern Themes
Timing:
- Micro-interactions: 100-150ms
- State transitions: 150-200ms
- Page/view transitions: 250-350ms
Easing:
- Enter:
ease-out(cubic-bezier(0, 0, 0.2, 1)) - Exit:
ease-in(cubic-bezier(0.4, 0, 1, 1)) - Standard:
ease-in-out(cubic-bezier(0.4, 0, 0.2, 1))
Animations: | Action | Animation | Duration | |--------|-----------|----------| | Window open | Scale 0.95->1.0, fade in | 200ms | | Window close | Scale 1.0->0.95, fade out | 150ms | | Window minimize | Scale to taskbar position | 300ms | | Button hover | Background fade | 100ms | | Menu open | Fade in + slight Y translation | 150ms |
Fluent Themes
Timing:
- Fast: 83ms (button hover)
- Normal: 167ms (standard transitions)
- Slow: 250ms (page transitions)
Easing: Windows uses custom bezier curves
- Standard:
cubic-bezier(0.8, 0, 0.2, 1)
9. Accessibility
Color Contrast
All themes must meet WCAG 2.1 AA standards:
- Normal text: 4.5:1 minimum contrast ratio
- Large text (18px+): 3:1 minimum contrast ratio
- UI components: 3:1 minimum contrast ratio
High Contrast Mode
MayteraOS includes a dedicated High Contrast theme:
- Background: Pure black
#000000 - Text: Pure white
#FFFFFF - Links/accents: Bright cyan
#00FFFF - Borders: White 2px
- No gradients or shadows
Focus Indicators
All interactive elements must have visible focus states:
- Retro: 1px dotted outline inside component
- Modern: Blue ring shadow
- Fluent: Black 2px outline with 2px white offset
Motion Sensitivity
- Respect OS-level "reduce motion" settings
- Provide instant alternatives for all animations
- Avoid parallax and auto-playing animations
10. Implementation Reference
Theme.ini File Format
[theme]
name = "Retro UNIX"
version = 1.0
author = "MayteraOS Team"
description = "Classic CDE/Motif inspired theme"
style = "retro" # retro, modern, fluent
[colors]
; Window titlebar
titlebar_active = 0x4B6983
titlebar_inactive = 0x8B8682
titlebar_text = 0xFFFFFF
; Window body
window_bg = 0xAEB2C3
window_border = 0x000000
; Window control buttons
close_button = 0xC0C0C0
close_button_hover = 0xE04040
minimize_button = 0xC0C0C0
maximize_button = 0xC0C0C0
; Button widgets
button_bg = 0xC0C0C0
button_bg_hover = 0xD0D0D0
button_bg_pressed = 0xA0A0A0
button_border = 0x606060
button_text = 0x000000
button_disabled = 0x808080
; Text widgets
label_text = 0x000000
textbox_bg = 0xFFFFFF
textbox_border = 0x808080
textbox_text = 0x000000
textbox_cursor = 0x000000
; Checkbox
checkbox_bg = 0xFFFFFF
checkbox_border = 0x808080
checkbox_check = 0x000000
; Desktop
desktop_bg = 0x5F7B97
; Taskbar/Dock
taskbar_bg = 0xC0C0C0
taskbar_hover = 0xD0D0D0
taskbar_active = 0x4B6983
start_button = 0xC0C0C0
gauge_bg = 0x808080
gauge_fg = 0x4B6983
; Menus
menu_bg = 0xC0C0C0
menu_border = 0x000000
menu_item_hover = 0x4B6983
menu_text = 0x000000
menu_text_disabled = 0x808080
menu_separator = 0x808080
; Scrollbar
scrollbar_bg = 0xA0A0A0
scrollbar_thumb = 0xC0C0C0
scrollbar_thumb_hover = 0xD0D0D0
; Selection
selection_bg = 0x4B6983
selection_text = 0xFFFFFF
[dimensions]
titlebar_height = 20
border_width = 2
corner_radius = 0
button_height = 24
scrollbar_width = 16
resize_grip_size = 10
[typography]
font_family = "Terminus"
font_size = 12
font_weight = 400
titlebar_font_size = 12
titlebar_font_weight = 600
[effects]
; 0 = none, 1 = subtle, 2 = full
animations = 0
shadows = 0
transparency = 0
blur = 0
[borders]
; Style: flat, 3d-raised, 3d-sunken, outline
button_style = 3d-raised
input_style = 3d-sunken
window_style = 3d-raised
C API Integration
The theme system integrates with the kernel via themes.h:
// Get current theme colors
const theme_t *theme = theme_get_current();
uint32_t titlebar_color = theme->titlebar_active;
// Or use convenience macros
draw_rect(x, y, w, h, THEME_BUTTON_BG);
Adding a New Theme
- Create directory:
/THEMES/<theme-name>/ - Create
theme.iniwith all required fields - Add theme ID to
themes.h:
#define THEME_MY_THEME 8
- Add theme definition to
g_themes[]array inthemes.c - Increment
MAX_THEMESif needed - Rebuild kernel
Appendix A: Color Conversion Reference
| Format | Example | Notes |
|---|---|---|
| Hex (theme.ini) | 0x4B6983 | 0xRRGGBB format |
| Hex (CSS) | #4B6983 | #RRGGBB format |
| RGB | 75, 105, 131 | Decimal RGB |
| ARGB | 0xFF4B6983 | With alpha channel |
Appendix B: Quick Reference Card
Retro UNIX At-a-Glance
- Titlebar: 20px, solid color
- Borders: 2px 3D beveled
- Corners: Square (0px radius)
- Buttons: 3D raised/sunken
- Shadows: None
- Animations: None
Modern Light At-a-Glance
- Titlebar: 28px, translucent
- Borders: 1px subtle
- Corners: 10px radius
- Buttons: Flat with subtle shadow
- Shadows: Soft drop shadows
- Animations: 150-200ms ease
Fluent Light At-a-Glance
- Titlebar: 32px, Mica material
- Borders: 1px with accent bottom
- Corners: 8px radius
- Buttons: Flat with bottom border
- Shadows: Elevation-based
- Animations: 167ms standard This style guide is a living document. Updates should be coordinated through the UI Lead.