Dark + Light CSS + JS Domoticz Font Awesome 7

Nightglass Premium Dark Theme for Domoticz

A sophisticated dark/light theme that transforms your Domoticz home automation dashboard into a focused, control-room experience — deep navy surfaces, smart device icons, sparkline charts, and a command palette that puts every device at your fingertips.

What is Nightglass?

Nightglass is a drop-in theme for Domoticz. Clone the repository into Domoticz's www/styles/ directory — custom.css and custom.js are thin loaders that pull in the full theme from the src/css/ and src/js/ modules — and your dashboard is transformed.

The CSS layer handles all visual styling: color tokens, card layout, glassmorphism login, responsive navbar, and full dark/light mode support via a single body.dz-light class toggle. The JS layer adds intelligence: automatic Font Awesome icon replacement for every device type, live sparkline micro-charts, a command palette, keyboard shortcuts, cloud-synced settings, and more.

16 Theme Presets
One-click palettes from Nightglass to Cyberpunk, Nord, Dracula, and more. Full dark & light color systems for each.
Command Palette
Ctrl+K — global fuzzy search and device control from any page, like Spotlight for your home.
Sparkline Charts
Inline SVG micro-charts on every sensor card showing the last 24h trend — temperature, humidity, rain, wind, and more.
Smart Icon System
90+ device types automatically mapped to Font Awesome icons with correct on/off colors, glow effects, and wind rotation.
Dark / Light Mode
Full peer dark and light color systems. One-click toggle, OS auto-detection, and per-mode color customization.
Server-Side Sync
Settings live on the Domoticz server, per user — your theme follows you across every browser and device automatically.
Live Toasts
Device changes surface as toasts straight off the WebSocket feed, backed by a navbar bell and a history panel on the N key.

Installation

Nightglass is a drop-in theme. No build step, no Node, no dependencies — clone it once and activate in Domoticz settings.

1

Navigate to your Domoticz styles directory

Domoticz loads custom themes from www/styles/ inside its install directory.

bash
cd /home/pi/domoticz/www/styles/
2

Clone the repository into a theme folder

The folder name determines the theme name shown in Domoticz. You can call it anything — nightglass is the conventional name.

bash
git clone https://github.com/galadril/Domoticz-Nightglass-Theme.git nightglass

Or update an existing installation:

bash
cd nightglass && git pull

Copy the whole repository, not just the two root files. custom.css and custom.js are thin loaders: the CSS lives in src/css/, the JS modules in src/js/, the 16 built-in palettes in themes/ (fetched at runtime, one JSON per preset), and the logo in images/. A partial copy fails quietly — missing preset files are skipped without an error, so the presets grid simply comes up empty.

3

Restart Domoticz (first-time install only)

Domoticz needs a restart to detect the new theme directory. Not required for updates.

bash
sudo systemctl restart domoticz
4

Activate in Domoticz

Go to Setup → Settings → Interface and set the theme to Nightglass. Save and reload.

Note: Nightglass overrides the Default theme CSS. The folder name you choose is what appears in the Domoticz theme dropdown — it does not have to be nightglass.

Visual Design

Nightglass uses a deep navy color palette with a single cool-blue accent that carries all interactive meaning — links, focus rings, active borders, and on-state icon color. Surface depth is created by stepping through surface-container levels, not by varying hue.

Elevation System
Four elevation levels using surface-container tokens. Glassmorphism reserved for modals & login — never on live device cards.
Smooth Animations
State-change flash, 3D card tilt, ambient device glow, and staggered navbar entrance. All respect prefers-reduced-motion.
Sensor Value Accents
Cards pick up a colour-coded top border from the reading itself — temperature, humidity, CO₂, UV, rain, wind and visibility.
Fully Responsive
Navbar collapses to a hamburger, cards reflow to single column, filter drawer becomes mobile-optimized. Works on tablets and phones.
Staleness Indicator
Devices with no update for a configurable time period get a visual stale marker — instantly spot offline or stuck sensors.
System Font Stack
Zero web fonts. Text renders in the OS typeface — zero latency, zero layout shift, beautifully anti-aliased on every platform.

Color Token Reference

All colors are CSS custom properties defined in :root (dark) and overridden in body.dz-light (light). Never hardcode hex values.

TokenDark defaultRole
--dz-body-bg#1b1d25Page background
--dz-card-bg#23252fDevice card fill
--dz-accent-color#4e9af1Primary accent — links, focus, on-state
--dz-text-color#e2e4edPrimary text
--dz-text-muted#b0b3c6Secondary / label text
--dz-border-color#3a3b47Card and panel borders
--dz-success-color#4caf7dSuccess / on-state green
--dz-warning-color#f0a832Warning / low battery amber
--dz-danger-color#e05555Error / timeout red

Smart Features

The JS layer adds a layer of intelligence on top of the Domoticz AngularJS application without modifying any Domoticz files.

The Feature Tour

The first time you load Nightglass while signed in, a short tour opens over the dashboard — eleven stops covering the hold gesture, the keyboard systems, the filter bar and the two panels that are otherwise hard to find. Every stop demonstrates itself with live theme components rather than screenshots, so it cannot go stale when a colour token changes.

← → move between stops, Esc leaves, and the row of icons along the bottom jumps straight to any chapter. It shows once per Domoticz account; under Settings → Nightglass → Appearance → Feature Tour, Show now replays it on the spot and Reset makes it open by itself again on the next load.

Live WebSocket Updates

Real-time card updates via Angular's device_update events — device values, icons, and timestamps update without any page refresh. State changes trigger a brief flash animation to draw your eye to what just changed.

Sparkline Micro-Charts

Every sensor card that supports history (temperature, humidity, rain, wind speed, counters, UV index) gets an inline SVG area chart drawn across the whole card as a background watermark — faint enough to read the value straight over, and lifting slightly when you hover the card. Data is fetched from the Domoticz JSON API and rendered as a 24-hour trend.

Timestamp Formatting

Raw Domoticz timestamps are reformatted to human-readable relative labels: today 3:42 pm, yesterday 10:15 am, Apr 3, 2:00 pm. Each card gets a pinned footer bar with the formatted timestamp.

Live Toasts

Device changes arriving on the WebSocket feed surface as toasts in the corner of the screen. The Event Filter defaults to meaningful — switches and event-style sensors only, so a temperature probe reporting every minute does not toast — and can be widened to every device change. Duration (2–10s), corner, and a per-device suppression list are all configurable under Live Notifications in the settings panel.

Notification History

Toasts are ephemeral; the history panel is the record. A bell in the navbar accumulates the last 50 device updates with an unread badge, and clicking an entry jumps to that device's card and highlights it. Open it from the bell or with N; Esc closes it. On desktop it slides in from the right, on mobile up from the bottom. The list is scoped to the devices your Domoticz account can see.

Animated Device Icons

Icons can carry a per-device animation chosen in the Icon Studio — spin, glow, flicker and six more. The whole layer is gated on Animate Device Icons, so a dashboard on a wall panel can keep the icons still.

Dashboard 2.0 Enhancements

Domoticz's Dashboard 2.0 (dd- widgets) gets the same treatment as the classic pages: glass card surfaces, entrance animations, a right-click context menu on widgets, and a fullscreen mode for wall-mounted displays.

Ace Editor & Highcharts Theming

The Events page Ace editor automatically applies and persists your chosen theme (in localStorage, under dz-ace-theme — it follows whatever you pick in Domoticz's own theme dropdown). Highcharts panels (device history, reports) get a full dark or light palette applied globally — no chart looks out of place.

Icon System

Every Domoticz PNG device image is automatically replaced with a Font Awesome 7 icon using a two-pass replacement strategy: initial scan on load, then delta updates via MutationObserver watching image src attribute changes.

Device Map

90+ device types are mapped in DEVICE_MAP inside src/js/icons.js. Each entry specifies an icon class, an on-state color, and an off-state color:

javascript
// Add a new device type to DEVICE_MAP:
"ChargingStation48": {
    icon:     "fa-solid fa-charging-station",
    colorOn:  "#4e9af1",
    colorOff: "#6c757d"
}

Per-Device Overrides

Individual devices can override their icon and color from the Nightglass Settings panel in Domoticz — no code changes needed. See Per-Device Overrides.

Special Behaviors

FeatureHow it works
Wind directionCompass direction filenames (N, NE, E, …) apply a CSS transform: rotate(Ndeg) to the arrow icon
Temperature rangesThermometer icon color shifts from ice-blue (≤0°C) through green (18–22°C) to red (≥35°C)
Alert levelsAlert icons adapt color to the device's alert level (0–4) from green to red
Favorite starsFilled/outline star based on the device's favorite state
Ambient glowOn-state icons emit a soft box-shadow in colorOn tint
Skip patternsCamera defaults, RGB color picker, and evohome folder images are never replaced

Light & Colour Control

Every place Domoticz asks for a colour is rebuilt: the device popup, and the in-page control on the device, scene, group and timer edit pages. Both drive Domoticz's own colour pipeline, so protected devices still prompt for a passcode and staged values (timers) still stage rather than send.

Hold to Switch

A click on a card icon does not always switch the device. Domoticz sends colour lights straight to the picker, so turning one off meant opening it and finding a preset. Press and hold the icon frame instead — about half a second — and the device switches on or off. A fill grows out of the centre of the frame while you hold, so you can see how much longer to keep pressing, and the frame blooms once the command is away. On a phone it buzzes too.

The gesture is offered on on/off switches, dimmers and colour lights — anything with a plain on and off. Devices without one stay as they are: a push button, a selector, a door lock, blinds and read-only sensors show no fill and keep their click. The click itself is untouched everywhere, so a colour light still opens the picker on a tap and protected devices still prompt for their passcode. Turn it off under Settings → Nightglass → Appearance → Hold to Switch.

The Device Popup

  • Colour wheel — canvas hue/saturation wheel with a live preview swatch
  • Warmth bar — cool-to-warm gradient for white and tunable-white lights
  • Brightness — slider plus a typed percentage, whichever is quicker
  • Presets — On and Off as one-press buttons, plus Full and Night on colour lights
  • Instant apply — every control acts as you use it; there is no "Set Colour" step, and switching tabs deliberately does not send, so browsing the White tab can't turn an off light on

The popup adapts to the light: an RGB device gets the wheel only, RGBW/RGBWW gain a White tab, and WW/CW devices open straight onto the warmth bar.

Typing an Exact Colour or White

The preview field is editable. On the colour side it takes a hex value — type or paste #ff8800 instead of hunting for it on the wheel. On the warmth side it takes kelvin (2700–6500 K), which is the unit lamps are actually sold in; Domoticz's underlying warmth axis is a unitless 0–255, so an exact white was previously something you could drag to but never reproduce.

Recently Used Colours & Whites

Every picker in the theme feeds one shared strip of the last five colours you committed to — the popup, the in-page picker, the settings panel, per-device icon colours, and Domoticz's own colour fields (bar and gauge ranges, Dashboard 2.0 widget settings). Match two devices without copying a hex code around.

Colour temperatures keep a second, separate strip, shown beside the warmth bar and labelled in kelvin on hover. A white is not a hue: it drives a different control and can't stand in for a colour, so the two lists never crowd each other out. Setting the same 3200 K across a row of WW lamps is one click each.

Keyboard Shortcuts

Nightglass turns your keyboard into a dashboard remote. Four distinct shortcut systems cover navigation, search, device control and notifications.

Quick Navigation — Number Keys

Press a number key (when no input is focused) to instantly jump to a section:

KeySection
1Dashboard
2Switches & Lights
3Scenes & Groups
4Temperature
5Weather
6Utility
7Cameras
8Log
9Setup

Page Filter — /

Quickly find a device on the current page. Type to filter, navigate with ↑ ↓, press Enter to scroll to and flash-highlight the device. Press Esc to close.

Use this when you're already on the right page (e.g., Switches) and want to find one device among many without scrolling.

Command Palette — Ctrl + K

A Spotlight-style overlay for global device control from any page. Press Ctrl + K (or ⌘K on Mac) anywhere to open it.

ShortcutAction
Ctrl + KOpen / close the command palette
↑ / ↓Navigate the device list
EnterToggle device on/off (or expand dimmer)
Shift + EnterNavigate to the device's page and highlight it
EscClose palette

Command Palette Features

  • Fuzzy search — type lvng lght to find "Living Room Light"
  • Favorites first — shows starred devices by default
  • Live state — current on/off/level/temp with color coding
  • Dimmer slider — inline 0–100% brightness control
  • Smart routing — auto-navigates to the correct page for each device type

Notification History — N

Toggles the notification panel — the last 50 device updates, so a change you missed is still there to read. Esc closes it. Like the number keys and /, it is ignored while an input is focused.

Filter Bar

A multi-dimensional filter panel that replaces Domoticz's native room selector on every device page — pure client-side, zero page reloads.

The filter bar appears below the top bar on all category pages (Dashboard, Switches, Temperature, etc.). It offers five filter dimensions that can be combined:

DimensionOptionsBehavior
RoomsAll plans from DomoticzPersists across page navigation
TypeSwitch types & sensor types on current pagePruned when navigating to a new page
HardwareHardware names on current pagePruned when navigating to a new page
StatusDevice state on the current page (on / off / open / closed …)Pruned when navigating to a new page
FavouritesOn / Off togglePruned when not relevant on new page

All filtering is AND-ed across dimensions and OR-ed within each dimension. The filter bar patches Angular's dashboardService.loadFavorites and livesocket.getJson to always fetch all devices (not just the current room's subset), so every device is in the DOM for instant client-side show/hide.

Open or close the filter panel with the Filters button in the search bar. On mobile it slides in as a full-height drawer with a backdrop.

Theme Presets

16 built-in palettes selectable with a single click in the Nightglass settings panel. Each preset defines a complete dark and light color system.

Nightglass The original dark theme — deep navy surfaces with cool blue accents
Emerald Forest Lush greens on charcoal — nature-inspired and easy on the eyes
Solar Flare Warm amber and burnt orange on deep brown — sunset dashboard vibes
Arctic Ice Crisp cyan and white on slate — clean, clinical, and modern
Violet Nebula Rich purples and magentas on deep space — a cosmic palette
Rose Gold Soft pink-copper tones on warm gray — elegant and refined
Monochrome Pure grayscale — minimal, distraction-free, and timeless
Crimson Ember Bold reds on dark charcoal — intense, dramatic, and powerful
Matrix Green phosphor on black — follow the white rabbit
Cyberpunk Neon magenta and electric cyan on pitch black — Night City awaits
Dracula The beloved Dracula color scheme — purple, pink, green and cyan on dark
Solarized Precision colors designed for readability and reduced eye strain
Synthwave Retro 80s neon — nostalgic vibes with electric pinks and purples
Nord Arctic-inspired pastels — calm, minimal, and easy on the eyes
Hacker Terminal amber on pitch black — command-line inspired
Ocean Depth Deep blues and teals — underwater serenity

Select any preset in Setup → Settings → Nightglass. Presets instantly apply with a live preview. You can then further fine-tune individual colors with the color editor.

Saving Your Own

Once you have the colours where you want them, Save current colors as preset adds them to the same grid alongside the sixteen built-ins, so you can jump back after experimenting — or keep one palette for the wall tablet and another for the desktop. Your presets are stored server-side with the rest of your settings and travel with them through export and import.

The built-in palettes ship as one JSON file each in the theme's themes/ directory and are fetched when the presets grid opens — which is why that directory has to come along with the rest of the repository.

Color Editor

Fine-tune every color role with a live preview. Changes take effect instantly on the Domoticz interface behind the settings panel.

Every role is edited as a pair — the dark value and the light value sit side by side in the same row, under Dark and Light headers, so a role can never be updated in one mode and forgotten in the other.

Panel sectionRoles
ColorsAccent, Danger, Warning, Success
Background & SurfacePage Background, Navbar & Cards, Card Surface, Borders, Text

Each picker carries the shared recently used colours strip, so a colour used on a device is one click away here too.

Per-Device Icon Overrides

Assign a custom Font Awesome icon, on-color, and off-color to any individual device — no code changes required.

Open the Nightglass settings panel, go to Device Icons → Per-Device Icons, search for your device by name or idx, then pick any Font Awesome 7 icon from the Icon Studio and choose its colours and animation. Overrides are stored with the rest of your settings, server-side, so they follow you between browsers.

  • Visual icon picker with live search across all Font Awesome icons, plus any extra libraries installed in Domoticz
  • Separate on-state and off-state colours with live preview
  • A per-device animation — spin, glow, flicker and six more
  • Overrides take effect immediately without a page reload
  • Remove any override to revert to the automatic icon from DEVICE_MAP

On Domoticz builds that own the icon themselves, the shape is saved in Domoticz's own Icon column and Nightglass stores only the colours and animation — the same dialog, one less thing duplicated.

Extra Icon Libraries

Extra icon fonts are installed in Domoticz itself, under Setup → Custom Icons: give it a source URL and a class prefix and Domoticz downloads, stores and serves the library for every browser on the server.

  • Nothing to configure in Nightglass — installed libraries appear in the Icon Studio on their own
  • Each one gets its own group in the picker, searchable alongside Font Awesome
  • Adding, refreshing and removing a library all happen on Domoticz's own page

Sync & Export

Nightglass settings live on the Domoticz server rather than in the browser, so your theme automatically follows you to any browser or device signed in to the same server.

Where Settings Are Stored

On current Domoticz builds the theme uses Domoticz's own per-user theme settings API — settings are attached to your Domoticz account, so two people sharing a server can each have their own palette. On older builds without that API, the theme falls back to user variables (ngTheme_settings, plus ngTheme_presets for saved palettes, which are kept separate to stay under the user-variable size cap). If the server cannot be reached at all, changes are held in localStorage for the session so the interface still behaves — they just don't sync anywhere.

StorageWhatWhen
Domoticz theme settings (per user)All settings — primary storeOn every change, debounced
User variables ngTheme_*All settings — legacy fallbackOnly on builds without the theme settings API
localStorageDark/light preference (dz-theme-style), Ace theme, recent colours & whites; whole-settings cache when the server is unreachableInstantly — these are per browser by design
JSON export fileFull settings snapshotManual export

Import / Export

The settings panel footer has one-click Export and Import buttons. Export saves your full colour theme, feature flags, saved presets and per-device icon overrides as a single JSON file to share or back up.

Settings are read and written through window.dzNightglassSettings.get(key) and .set(key, value), whichever store is in use. Every feature flag is gated on these, which is what makes adding a new settings-controlled behaviour cheap.

Settings Reference

All settings are accessible at Setup → Settings → Nightglass. The headings below are the panel's own sections, in the order they appear. Colour roles are covered separately under Color Editor.

Icons

Navbar Menu Icons
Replace the PNG menu icons with Font Awesome in the navigation bar.
on
Device Icons
Let Nightglass colour and size device icons; off leaves Domoticz's own untouched.
on
Animate Device Icons
Play the animation each device was given in the Icon Studio — spin, glow, flicker and six more.
on

Appearance

Theme Mode
Manual toggle (shows the navbar sun/moon button), Auto (follows the OS prefers-color-scheme), Always dark, or Always light.
manual
Base Font Size
Scale the entire interface, 80–125% in 5% steps.
100%
Device Icon Size
Scale device icons on cards, 60–150% in 5% steps.
100%
Show Last Update
Show the formatted timestamp footer on device cards.
off
Uppercase Device Names
Force device names to UPPERCASE on cards.
on
Hold to Switch
Press and hold a card's icon to switch the device on or off. Applies to on/off switches and dimmers, including colour lights — where a click opens the picker instead.
on
Feature Tour
Show now replays the tour immediately. Reset clears the "seen" mark so it opens by itself on the next load — it does not open the tour, because closing the tour marks it seen again.
—

Effects & Animations

3D Card Tilt
Subtle ±3° perspective tilt on device cards as the mouse moves over them.
on
Sparkline Charts
Mini 24h trend charts as card watermarks. Fetches from the Domoticz history API.
on
Staleness Dot
Pulsing red dot on devices that haven't updated in 24 hours. The threshold is fixed, not configurable.
on
State-Change Flash
Blue/red ring flash when a device changes state.
on
Sensor Value Accent
Colour-coded top border reflecting the sensor value — temperature, humidity, CO₂, UV, rain, wind and visibility.
on
Card Animations
Entrance animations and hover transitions on cards.
on
Navbar Animations
Staggered entrances, the sliding indicator, and dropdown effects.
on
Smooth Scrolling
Enable smooth scroll behaviour page-wide.
on

Live Notifications

Device State Toasts
Show a toast when a device changes state on the live WebSocket feed.
on
Event Filter
Meaningful (switches & event sensors) or all device changes. Meaningful skips continuous sensors like temperature and power meters.
meaningful
Visible Duration
How long each toast stays on screen before fading: 2, 4, 6 or 10 seconds.
4s
Position
Where toasts appear: bottom right, bottom center, or top right.
bottom right
Suppressed Devices
Block specific devices from ever raising a toast, managed in its own dialog.
none

Device Icons

Per-Device Icons
Opens the Icon Studio: pick an icon for a device, then give it on/off colours and an animation. See Per-Device Overrides.
—

Developer

Debug Logging
Print verbose trace logs from every theme module to the browser console — [Settings], [Cards], [Spark], [Toast], [RT], [Notif] and friends. Session only; resets on a hard refresh.
off

Dark / Light Mode

Nightglass ships with a full peer dark and light color system — light mode is not an afterthought, every color token has a light-mode counterpart.

The sun/moon button injected into the navbar cycles between dark → light → auto. In auto mode the OS prefers-color-scheme is respected and live OS theme changes are applied without a reload. The preference is stored in localStorage under the key dz-theme-style.

Light mode is implemented as a single body.dz-light class override — all dark-mode tokens in :root are re-declared in body.dz-light with light-palette values. This means any third-party CSS targeting Domoticz elements will also respond correctly if it uses the --dz-* variables.

The color editor lets you set separate accent, surface, and text colors for dark and light modes independently.

Troubleshooting

Theme not showing after installation

Make sure the theme folder is directly inside www/styles/ and contains both custom.css and custom.js plus the src/ directory. Restart Domoticz once after cloning, then select the theme by folder name in Setup → Settings → Interface → Theme.

Icons not replacing / showing broken images

The icon replacement patches into Angular's rendering cycle. If icons appear as broken PNGs, check the browser console for JS errors. Make sure Font Awesome is loading — it ships with Domoticz but can be blocked by ad-blockers. Try disabling extensions.

Sparklines not appearing

Sparklines require a successful call to json.htm?type=graph. If the Domoticz API is unreachable from the client, they silently skip. Enable Debug Logging in the Nightglass settings panel and check the browser console for [Spark] log lines.

No theme presets in the panel

The presets grid is built from the JSON files in the theme's themes/ directory, fetched when you open it. If that directory did not come along with the rest of the install, the fetches fail silently and the grid stays empty — copy the whole repository, or git pull in place, and reload.

Settings not saving

Settings are written to the Domoticz server for your user account. Make sure the account you are signed in with has write access, and that the session hasn't expired. If the server can't be reached, changes are kept in localStorage for the current session so the interface still responds — but they won't sync to other browsers, and a hard refresh may lose them.

Filter bar not showing all rooms

Room pills are built from the Domoticz plans API. If a plan has no devices, it won't appear. The filter bar fetches plan data once on init — if it was loaded before plans were ready, reload the page.

Updating

To update Nightglass to the latest version:

bash
cd /home/pi/domoticz/www/styles/nightglass
git pull

No Domoticz restart required for updates — the browser loads the new files on next page visit. Hard-refresh (Ctrl+Shift+R) if you see stale CSS or JS due to browser caching.

Your custom settings, saved presets and per-device icon overrides live on the Domoticz server, not in the theme folder — git pull never touches them.

Support & Donate

Found a bug? Have a feature request? Open an issue on GitHub — pull requests are very welcome.

Buy me a coffee

If Nightglass has made your Domoticz experience better, a small donation is always appreciated. It keeps the project going and the coffee warm.