Theme Modes
The app supports three theme modes accessible from the dropdown in the top-right corner:Auto Mode
Automatically follows your system preference
Dark Mode
Always use the dark theme
Light Mode
Always use the light theme
Accessing Theme Settings
Locate the Theme Control
Find the theme selector in the header at the top-right corner. It displays a half-circle icon (⚫⚪) next to a dropdown.
Open the Dropdown
Click the dropdown to see three options:
- Auto - System preference
- Dark - Dark theme
- Light - Light theme
Auto Mode (System Preference)
When set to Auto, the app detects your operating system’s theme preference:- How It Works
- System Integration
- Default Behavior
The app uses the CSS media query
prefers-color-scheme to detect your system setting:The system preference is checked when the page loads and whenever your system theme changes.
Dark Mode Theme
Dark mode uses a dark color palette optimized for low-light environments:Color Palette
Visual Characteristics
High Contrast
Bright accent colors (#e8ff47) against dark backgrounds provide excellent readability
Reduced Eye Strain
Dark background (#0f0f0f) is easier on eyes in low-light conditions
Subtle Borders
Muted borders (#2a2a2a) separate elements without harsh lines
Grain Overlay
40% opacity texture adds visual interest (style.css:49)
The active tab uses inverted colors in dark mode: the bright accent background gets black text for optimal contrast (style.css:176-178).
Light Mode Theme
Light mode provides a clean, professional appearance for bright environments:Color Palette
Visual Characteristics
Professional Aesthetic
Clean white surfaces (#ffffff) with blue accents (#3558ff) create a business-friendly look
Better in Bright Light
Light background reduces glare on bright screens and outdoor use
Clear Hierarchy
Stronger borders (#d9deeb) clearly define sections and controls
Softer Grain
14% opacity texture is subtle and non-distracting (style.css:52-54)
Persistent Storage
Your theme preference is automatically saved to the browser’s localStorage:How Storage Works
From app.js:36-42
What This Means
Persistent Across Sessions
Your theme choice is remembered when you close and reopen the app
Per-Browser Storage
Settings are saved separately in each browser you use
Per-Domain
Theme settings are specific to the domain where the app is hosted
No Account Required
Preferences are stored locally without needing a user account
Flash-Free Loading
The app implements a flash-of-incorrect-theme prevention system:Inline Theme Script
A blocking script in the<head> applies the theme before the page renders:
Why This Matters
Without Prevention
Without this script, users would briefly see the default dark theme before JavaScript loads and applies their preference.
Inline Execution
The inline script runs immediately as the HTML is parsed, before any CSS or body content loads.
Theme Application Logic
CSS Data Attribute
Themes are applied via adata-theme attribute on the root <html> element:
CSS Variable Switching
The CSS uses this attribute to switch color palettes:data-theme attribute instantly updates the entire interface.
Initialization Process
The theme system initializes when the page loads:The initialization happens before category tabs are populated, ensuring the UI matches your theme preference from the start.
Accessibility Features
Semantic HTML
aria-label for screen readers.
Color Contrast
Both themes maintain WCAG accessibility standards:Dark Mode Contrast
Light text (#f0f0f0) on dark background (#0f0f0f) provides excellent contrast ratio
Light Mode Contrast
Dark text (#10131a) on light background (#ffffff) ensures readability
Visual Indicators
The active theme is always visible:- The dropdown shows the current selection (AUTO, DARK, or LIGHT)
- The half-circle icon provides a visual cue for theme-related settings
Theme Comparison
| Feature | Dark Mode | Light Mode |
|---|---|---|
| Background | #0f0f0f (nearly black) | #f2f4f8 (light gray-blue) |
| Accent Color | #e8ff47 (yellow-green) | #3558ff (vibrant blue) |
| Text Color | #f0f0f0 (off-white) | #10131a (nearly black) |
| Best For | Low light, evening use | Bright environments, daytime |
| Grain Opacity | 40% | 14% |
| Button Text | Black on accent | White on accent |