Greasy Fork is available in English.

OpenStreetMap Dark Mode (filter-based)

Dark Mode for OpenStreetMap tiles based on inverting the colors and then rotating the hue.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         OpenStreetMap Dark Mode (filter-based)
// @namespace    http://tampermonkey.net/
// @version      1.1.0
// @description  Dark Mode for OpenStreetMap tiles based on inverting the colors and then rotating the hue.
// @author       scy
// @license      MIT
// @match        *://www.openstreetmap.org/*
// @grant        GM_addStyle
// ==/UserScript==

// SPDX-FileCopyrightText: 2024 scy
// SPDX-License-Identifier: MIT

(function() {
    'use strict';

    GM_addStyle(`
      @media (prefers-color-scheme: dark) {
        /* Add filter to the tile images and map key. We need to include
         * .leaflet-tile-container in the selector since that's what the dimming
         * on the original site is targeting (as of 2024-11-15). */
        .leaflet-tile-container .leaflet-tile, .mapkey-table-entry td:first-child > * {
          filter: invert(95%) hue-rotate(180deg);
        }
      }
    `);
})();