Color Architecture
Colors are defined as HSL triplets (hue, saturation, lightness) in CSS variables, then referenced via Tailwind’salpha() function for opacity support.
- Full opacity control (
/10,/20,/50, etc.) - Runtime theme switching
- Type-safe Tailwind classes
Color Categories
Accent Colors
Primary brand colors for interactive elements.accent- Default accent (220, 90%, 56%)
Text Colors (Ink)
Hierarchical text colors for content.ink- Primary text (92% lightness)ink-dull- Secondary text (70% lightness)ink-faint- Tertiary text (55% lightness)
App Colors
Main application area colors for backgrounds, borders, and surfaces.app- Base background (235, 15%, 13%)app-box- Card/panel background (235, 15%, 18%)app-overlay- Overlay background (235, 15%, 16%)app-line- Border color (235, 15%, 23%)app-frame- Frame border (235, 15%, 25%)
Sidebar Colors
Sidebar-specific colors that can differ from main app area.sidebar- Base (235, 15%, 7%)sidebar-box- Panels (235, 15%, 16%)sidebar-line- Borders (235, 15%, 23%)sidebar-selected- Selected state (235, 15%, 24%)sidebar-button- Button background (235, 15%, 18%)sidebar-divider- Dividers (235, 15%, 17%)sidebar-ink/sidebar-ink-dull/sidebar-ink-faint- Text hierarchy
Menu Colors
Context menu and dropdown colors.menu- Base (235, 15%, 13%)menu-line- Borders (235, 15%, 23%)menu-hover- Hover state (235, 15%, 20%)menu-selected- Selected state (235, 15%, 24%)menu-shade- Shadow (235, 15%, 8%)menu-ink- Primary text (235, 15%, 92%)menu-faint- Secondary text (235, 10%, 55%)
Theming
Dark Theme (Default)
Uses--dark-hue: 235 with low lightness values.
Light Theme
Add.vanilla-theme class to root for light mode. Uses --light-hue: 235 with high lightness values.
text-ink, bg-app-box, etc.) automatically adapt to the theme.
Custom Themes
Create custom themes by defining a new class with color overrides:Best Practices
Use Semantic Names
Don’t use raw colors:Respect Context
Don’t mix contexts unnecessarily:Use Opacity for Variations
Don’t hardcode alpha values:Leverage Interaction States
Color Reference
Complete Color List
Accent:accent,accent-faint,accent-deep
ink,ink-dull,ink-faint
app,app-box,app-dark-box,app-darker-box,app-light-boxapp-input,app-focus,app-buttonapp-line,app-dividerapp-hover,app-selected,app-activeapp-overlay,app-shade,app-frame,app-slider
sidebar,sidebar-box,sidebar-linesidebar-ink,sidebar-ink-dull,sidebar-ink-faintsidebar-divider,sidebar-button,sidebar-selected,sidebar-shade
menu,menu-line,menu-hover,menu-selectedmenu-ink,menu-faint,menu-shade
Migration from Generic Colors
If you have code using generic Tailwind colors, migrate to semantic names:| Old | New |
|---|---|
text-white | text-ink |
text-gray-400 | text-ink-dull |
text-gray-500 | text-ink-faint |
bg-gray-800 | bg-app-box |
bg-gray-900 | bg-app |
border-gray-700 | border-app-line |
hover:bg-gray-700 | hover:bg-app-hover |
