Here’s what I am using, almost similar to the legacy dark mode:
// ==UserScript==
// @name N8N Old Dark Theme
// @namespace http://tampermonkey.net/
// @version 2.1
// @description Restore old n8n dark theme style
// @match https://n8n.yourdomain.com/*
// @run-at document-end
// @grant none
// ==/UserScript==
(function() {
'use strict';
const colorMap = {
// Background
'#171717': '#2d2e2e',
'rgb(23, 23, 23)': '#2d2e2e',
// Background dots
'#747474': '#aaaaaa',
'rgb(116, 116, 116)': '#aaaaaa',
// Background dots
'#757575': '#aaaaaa',
'rgb(117, 117, 117)': '#aaaaaa',
// Node tile
'#2b2b2b': '#414244',
'rgb(43, 43, 43)': '#414244',
// Node border
'#949494': '#c3c9d5',
'rgb(148, 148, 148)': '#c3c9d5',
// UI border
'#212121': '#414244',
'rgb(33, 33, 33)': '#414244',
// Sticky note yellow
'#332700': '#51461f',
'rgb(51, 39, 0)': '#51461f',
// Sticky note orange
'#2d1d06': '#503d21',
'rgb(45, 29, 6)': '#503d21',
// Sticky note red
'#4f070d': '#62272c',
'rgb(79, 7, 13)': '#62272c',
// Sticky note green
'#0a291a': '#1c4a33',
'rgb(10, 41, 26)': '#1c4a33',
// Sticky note blue
'#081a2b': '#1e3852',
'rgb(8, 26, 43)': '#1e3852',
// Sticky note purple
'#211b50': '#3a3659',
'rgb(33, 27, 80)': '#3a3659'
};
function replaceColors() {
document.querySelectorAll('*').forEach(el => {
const computed = getComputedStyle(el);
const bg = computed.backgroundColor;
const borderColor = computed.borderColor;
const stroke = el.getAttribute?.('stroke');
const fill = el.getAttribute?.('fill');
if (colorMap[bg]) {
el.style.backgroundColor = colorMap[bg];
}
if (colorMap[borderColor]) {
el.style.borderColor = colorMap[borderColor];
}
if (stroke && colorMap[stroke.toLowerCase()]) {
el.setAttribute('stroke', colorMap[stroke.toLowerCase()]);
}
if (fill && colorMap[fill.toLowerCase()]) {
el.setAttribute('fill', colorMap[fill.toLowerCase()]);
}
});
}
let timeout;
function debouncedReplace() {
clearTimeout(timeout);
timeout = setTimeout(replaceColors, 50);
}
replaceColors();
const observer = new MutationObserver(debouncedReplace);
observer.observe(document.body, {
childList: true,
subtree: true
});
console.log('N8N theme loaded v2.1');
})();