NEX OS ships with a layered theming system: a base light/dark mode that controls the OS chrome and window surfaces, plus optional neon overlay themes that radically transform the entire visual experience — replacing window borders, accent colors, font rendering, border-radius, and the desktop background with immersive Three.js 3D scenes powered byDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/shadownrx/windows/llms.txt
Use this file to discover all available pages before exploring further.
@react-three/fiber.
Base Themes
NEX OS defaults todark mode. The base theme is stored per-user in SettingsContext and persisted automatically to localStorage. Toggling between light and dark applies immediately via the data-theme attribute on <html>.
src/index.css:
| Value | Background token | Description |
|---|---|---|
dark | #1c1c1c | Default OS appearance with dark surfaces |
light | #f3f3f3 | High-contrast light surfaces |
In light mode the system accent automatically shifts to
#0067c0 (Windows blue) to maintain WCAG contrast ratios. This override is applied directly in the :root[data-theme='light'] block.Neon Overlay Themes
Neon themes layer on top of the base theme and are tracked separately inneonTheme. When a neon theme is active, the data-neon attribute is set on <html> and the corresponding CSS custom properties take effect throughout the entire OS.
Type Definitions
Available Neon Themes
none
The default state. Standard OS appearance is used with no neon effects, no 3D background, and the accent color set by
accentColor (default #60cdff).cyberpunk
A pink/cyan palette with sharp
border-radius: 0, magenta neon window borders, and cyan point lights. The CyberpunkBG.tsx Three.js scene fills the desktop with floating octahedral geometries and a star field.matrix
A deep-green monochrome palette that switches the OS font to
Courier New. The MatrixBG.tsx scene renders 40 falling character streams in real time at #00ff41. Window borders glow green.synthwave
A retro purple/pink palette with
border-radius: 12px and a #f92aad accent. The SynthwaveBG.tsx Three.js scene features an infinite wireframe grid floor, a glowing #f92aad sun, and sparkle particles.Applying Themes Programmatically
Both the base theme and the neon overlay are exposed fromuseSettings(). The example below shows how a component can toggle the base theme, apply a neon overlay, and fire a system notification — the same pattern used inside ControlPanel.tsx.
CSS Custom Properties
Every neon theme injects its own set of CSS custom properties at the:root level. These variables cascade to every component in the OS — window frames, taskbar, notification toasts, start menu, and desktop icons.
Accent Color
TheaccentColor property controls the global accent used by buttons, highlights, and interactive elements when no neon theme is active. It defaults to #60cdff and is applied directly as a CSS custom property.
document.documentElement.style.setProperty('--win-accent', accentColor) on every change, giving instant visual feedback without a page reload.
When a neon theme is active,
--win-accent is overridden by the neon theme’s CSS rule. The stored accentColor value is preserved and will be restored when setNeonTheme('none') is called.3D Backgrounds
Each neon theme is paired with a dedicated Three.js scene rendered byBackground3D.tsx (located at src/components/system/Background3D.tsx). The orchestrator reads neonTheme from useSettings() and lazily mounts the correct scene inside a <Canvas> element with @react-three/fiber.
| Neon Theme | Component | Key Visual Elements |
|---|---|---|
cyberpunk | src/components/system/3d/CyberpunkBG.tsx | 15 floating octahedra (magenta/cyan), star field, MeshDistortMaterial |
matrix | src/components/system/3d/MatrixBG.tsx | 40 falling character streams (#00ff41), @react-three/drei <Text> |
synthwave | src/components/system/3d/SynthwaveBG.tsx | Infinite wireframe grid, #f92aad sun, purple glow halo, <Sparkles> |
Background3D component includes two automatic performance optimizations:
Reduced Motion Check
If the user’s OS has
prefers-reduced-motion: reduce set, the WebGL canvas is replaced with a static CSS radial-gradient fallback to avoid triggering vestibular disorders.<Canvas> is configured with dpr={[1, 2]} for Retina displays and powerPreference: "high-performance" to request the discrete GPU on machines with dual graphics.
Changing Themes via Control Panel
End users can switch themes visually through the built-in Control Panel app (src/components/apps/ControlPanel.tsx). It exposes a theme picker for neon overlays and an accent color swatch selector — both wired directly to setNeonTheme() and setAccentColor() from useSettings().