Force Dark Mode on Any Web Page: How-To
- Average speed (km/h)
- km/h
- Result
- Time (min)
- 30 min
- You entered
- Distance (km)
- 10 km
- You entered
You can force dark mode on any web page by using a browser extension, a built-in browser flag, or an operating-system-level setting that inverts or recolors page content. The exact steps depend on your browser and device, and results vary from perfect to merely usable. This guide covers the main methods, how they work, and how to fix common problems.
Formula
The average pace is the total time divided by the distance: pace = time / distance. The average speed is the distance divided by the time in hours: speed = distance / (time / 60). Both use minutes for time and kilometers for distance. Pace is expressed in minutes per kilometer, speed in kilometers per hour.
Worked Example
Using the default values (30 minutes, 10 km):
- Pace = 30 / 10 = 3.00 min/km
- Speed = 10 / (30 / 60) = 10 / 0.5 = 20.00 km/h
The calculator returns a pace of 3.00 min/km and a speed of 20.00 km/h.
How Dark Mode Works on Web Pages
Web pages are designed with light backgrounds and dark text by default. Forcing dark mode means overriding those colors. The simplest method is to invert the entire page (white becomes black, black becomes white), but that also inverts images and videos, making them look like negatives. Better methods use CSS filters that preserve media or use JavaScript to replace specific colors.
Modern browsers offer a native dark mode feature that uses the prefers-color-scheme CSS media query. When you enable it, sites that support dark mode automatically switch. For sites that don’t, you need a forced override.
Browser Extensions for Forced Dark Mode
Extensions are the most reliable way to force dark mode on any page. They inject CSS or JavaScript that converts light backgrounds to dark and light text to light. Popular options include Dark Reader, Midnight Lizard, and Turn Off the Lights (which has a dark mode). Dark Reader is widely used because it analyzes page colors and generates a dark theme that preserves readability. You can adjust brightness, contrast, and sepia filter. Some extensions let you whitelist sites so they remain light.
Installation is straightforward: go to your browser’s add-on store, search for a dark mode extension, and add it. After installation, click the extension icon to toggle it on or off per site. Most extensions work in Chrome, Firefox, Edge, and Opera. Safari has its own extension system, and many dark mode extensions are available there too.
Built-in Browser Flags and Settings
Chrome and Edge have a hidden flag that forces dark mode. Type chrome://flags (or edge://flags) in the address bar, search for “Auto Dark Mode for Web Contents,� enable it, and restart the browser. This applies a dark theme to all pages, but it only works if the page uses light colors that can be converted. Some pages may look broken, with unreadable text or missing backgrounds.
Firefox has a similar feature: in about:config, set ui.systemUsesDarkTheme to 1, but that only affects browser UI. For web content, Firefox relies on the prefers-color-scheme media query, which only works if the site supports it. Safari’s “Reader� mode can be forced to a dark background, but it only applies to articles, not the whole page.
Operating System Level Dark Mode
Windows, macOS, Android, and iOS all have system-wide dark mode settings. When enabled, they tell the browser to use dark mode for its UI and for sites that support prefers-color-scheme. However, they do not force dark mode on sites that ignore the setting. To force dark mode on every site, you still need an extension or a browser flag.
On Windows 10/11, go to Settings > Personalization > Colors and choose Dark. On macOS, go to System Settings > Appearance and select Dark. On Android, enable Dark theme in Display settings. On iOS, go to Settings > Display & Brightness and select Dark. After enabling, many sites will switch automatically, but not all.
How to Choose the Right Method
Consider your needs:
- If you want a consistent dark look on all sites, use a browser extension with per-site control.
- If you only want dark mode on sites that support it, use the OS setting or browser’s native dark mode.
- If you want a quick test without installing anything, use a browser flag (Chrome/Edge).
- If you are on a mobile device, use the OS dark mode plus a mobile browser that supports forced dark mode, like Firefox for Android with the “Dark� setting.
Extensions give you the most control, but they can slow down page loading slightly because they process every page. Flags and OS settings are lighter but less flexible.
Common Problems and Fixes
Forced dark mode can cause issues:
- Images look inverted: Use an extension that excludes images from inversion, or enable “smart inversion� that detects images.
- Text becomes unreadable: Adjust the extension’s contrast and brightness, or try a different extension.
- Some buttons or form fields disappear: Whitelist that site or disable dark mode for it.
- Performance drops: Disable dark mode on heavy sites, or use the browser flag instead of an extension.
- Dark mode doesn’t apply to PDFs or internal pages: Extensions often ignore browser internal pages for security reasons.
If a site looks broken, the safest fix is to turn off forced dark mode for that site. Most extensions allow you to click the icon and toggle the site off.
Alternatives to Forcing Dark Mode
If you don’t want to force dark mode, you can use a “reader view� that strips away page design and shows text on a dark background. Most browsers have a reader mode (often a book icon in the address bar). You can also install a custom CSS style via extensions like Stylus, but that requires coding knowledge. Another alternative is to use a browser that has built-in dark mode for all pages, like Brave or Vivaldi, which offer a “Force Dark Mode� setting.
Frequently Asked Questions
Does forcing dark mode save battery? On OLED screens, dark pixels use less power, so forcing dark mode can extend battery life. On LCD screens, the backlight is always on, so the savings are negligible.
Will forcing dark mode break websites? Yes, some sites rely on specific color contrast or have backgrounds that don’t invert well. You may see overlapping text or missing images. Whitelisting those sites is the standard fix.
Can I force dark mode on a specific site only? Yes, most extensions let you add a site to a whitelist or blacklist. You can set the extension to be off by default and enable it only for certain sites.
Why do some sites ignore my dark mode setting? Sites that don’t use the prefers-color-scheme media query won’t respond to the OS setting. They need a forced override, which is what extensions do.
Is forced dark mode the same as a site’s native dark mode? No. Native dark mode is designed by the site’s developers and looks perfect. Forced dark mode is a best-effort conversion that can have visual glitches.
Does dark mode work on PDFs in the browser? Most extensions don’t affect PDFs because they are rendered by the browser’s PDF viewer. Some browsers have a built-in dark mode for PDFs, but it’s not universal.
Related
Formula used
in t | Time (min) | min | 30 | 0 in d | Distance (km) | km | 10 | 0 out pace | Average pace (min/km) | min/km | t / d | 2 out speed | Average speed (km/h) | km/h | d / (t / 60) | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.