Default Theme
- World/Tech/Finance Monitor
- Happy Monitor
Default: Dark themeOptimized for:
- Reduced eye strain during extended monitoring
- Better contrast for map overlays
- Professional operations center aesthetic
The default theme applies only if you haven’t explicitly chosen a theme. Once you select dark or light, your preference overrides the variant default.
Switching Themes
The theme toggle is located in the header bar (top-right corner):Theme switches instantly
All panels, map overlays, and UI elements update in under 50ms with no page reload.
Theme Customization
World Monitor uses 20+ semantic CSS variables that adapt to the active theme:Color Variables
- Dark Theme
- Light Theme
Customizing Your Own Theme
If you’re running World Monitor locally, you can customize theme colors:- Open
source/src/styles/variables.css - Edit the CSS variables under
[data-theme="dark"]or[data-theme="light"] - Save and reload — changes apply instantly in dev mode
Theme-Aware Components
All UI elements adapt to the active theme:Map Overlays
- Cluster circles: opacity adapts
- Labels: inverted text color
- Markers: border contrast
- Heatmaps: palette shifts
Charts & Graphs
- D3.js timelines
- SVG sparklines
- Donut gauges
- CII score rings
News Panels
- Background cards
- Threat-level borders
- Keyword highlights
- Hover states
Video Players
- Control bar backgrounds
- Progress bars
- Volume sliders
- Quality selectors
Browser Theme Color
The<meta name="theme-color"> tag syncs with your active theme, changing the browser chrome color on mobile and PWA installs:
- Dark Theme
- Light Theme
Theme Changed Event
When the theme switches, World Monitor dispatches a custom event that panels can listen to:- Redrawing D3.js charts with new color palettes
- Updating map marker styles
- Refreshing video player controls
- Invalidating cached color computations
No Flash of Unstyled Content (FOUC)
World Monitor applies your theme preference before the first paint to prevent a flash of the wrong theme:Inline script runs in <head>
Before any stylesheets or components load, an inline
<script> in index.html reads localStorage and sets document.documentElement.dataset.theme.CSS variables are available immediately
Because the
data-theme attribute is set, theme-specific CSS variables apply during initial render.Accessibility
Both themes are designed for WCAG AA contrast compliance:- Dark theme: 4.5:1 contrast ratio for text on backgrounds
- Light theme: 4.5:1 contrast ratio for text on backgrounds
- Accent colors: Tested against both themes for readability
- Focus indicators are theme-aware (visible in both dark and light)
- Keyboard navigation works identically in both themes
- Screen readers announce theme changes via
aria-liveregions
Troubleshooting
Theme resets to default on reload
Theme resets to default on reload
This means
localStorage is being cleared. Possible causes:- Private browsing mode — localStorage doesn’t persist
- Cache clearing extension — blocks localStorage writes
- Browser security settings — some ad blockers prevent localStorage
Theme toggle button missing
Theme toggle button missing
Map tiles don't match theme
Map tiles don't match theme
Map tiles are fetched from MapTiler and cached by the service worker. If you switch themes:
- Wait 5–10 seconds for new tiles to load
- Or force-reload the page (Cmd+Shift+R / Ctrl+Shift+R)
- Or clear browser cache and reload
Some panels are still dark/light after switching
Some panels are still dark/light after switching
This indicates a panel isn’t using theme CSS variables. Check if:
- The panel has hardcoded colors (e.g.,
background: #000000) - The panel hasn’t subscribed to the
theme-changedevent - The panel uses external iframes (YouTube embeds don’t inherit theme)
Related Features
- Layouts — Panel arrangement and ultra-wide mode
- Localization — Language preferences and RTL support