DEV Community

Weather Clock Dash
Weather Clock Dash

Posted on

Dark Mode Firefox Automatically: How to Set It Up Without Manual Toggling

The most common way to enable dark mode in Firefox is manually: click a toggle, switch between light and dark. This works but requires you to remember to do it.

Here is how to have Firefox switch dark mode automatically.


Option 1: Use NightOwl (automatic by sunset)

NightOwl is a Firefox extension that applies dark mode automatically based on your location's sunset and sunrise. When sunset occurs, dark mode turns on. At sunrise, it turns off.

Setup:

  1. Install from Firefox Add-ons
  2. Open the extension popup
  3. Set your location (city name or coordinates)
  4. Choose "auto sunset/sunrise" mode

After setup: nothing else required. Dark mode turns on and off automatically every day.

Customization: If you prefer a fixed schedule (e.g., dark mode from 8 PM to 7 AM), you can set that instead of using astronomical sunset/sunrise.


Option 2: Follow your OS dark mode setting

Firefox can follow your operating system's dark mode setting:

  1. Open about:config in Firefox
  2. Search for ui.systemUsesDarkTheme
  3. Set it to 1 (always dark mode in Firefox UI)

Or, install a theme from Firefox Add-ons that follows the system setting automatically.

Limitation: This controls the Firefox interface (toolbars, tabs), not website content. Websites themselves need to implement prefers-color-scheme: dark for their content to switch automatically.


Option 3: NightOwl with specific schedule

For users who do not want sunset-based switching:

  1. Install NightOwl
  2. Open settings
  3. Choose "Schedule" mode
  4. Set specific hours (e.g., 20:00 to 07:00)

Dark mode turns on at 8 PM and off at 7 AM every day. No manual toggle.


Which to use

  • Want sunset/sunrise tracking: NightOwl with auto mode
  • Want specific hours: NightOwl with schedule mode
  • Want Firefox UI only (not websites): System setting + Firefox about:config

For most users who want websites to display in dark mode automatically, NightOwl is the most direct solution.


Install NightOwl for Firefox


NightOwl is one of 11 Firefox extensions I built — see the full series.

Top comments (0)