Dark Mode style for UDL
-
Is it possible for a user-defined language to include additional information for dark mode?

Currently my UDL describes colors that are good for light mode (= white canvas/background)……but are hard to read in dark mode (= greyish canvas/background)…

Finding a middle ground seems quite hard, so I wondered if it is possible to modify the style for the dark mode the same way it works for the included languages?
Notepad++ v8.9.2 (64-bit) Build time: Feb 13 2026 - 02:47:53 Scintilla/Lexilla included: 5.5.8/5.4.6 Boost Regex included: 1_90 pugixml included: 1.15 nlohmann JSON included: 3.12.0 Path: C:\Program Files\Notepad++\notepad++.exe Command Line: C:\Development\GIT\SWLLIS\dbsystem\dbcreate\Befund\befundauftrag.pro Admin mode: OFF Local Conf mode: OFF Cloud Config: OFF Periodic Backup: OFF Placeholders: OFF Scintilla Rendering Mode: SC_TECHNOLOGY_DEFAULT (0) Multi-instance Mode: monoInst asNotepad: OFF File Status Auto-Detection: cdEnabledNew (for current file/tab only) Dark Mode: ON Display Info: primary monitor: 1920x1080, scaling 100% visible monitors count: 3 installed Display Class adapters: 0000: Description - Intel(R) Iris(R) Xe Graphics 0000: DriverVersion - 32.0.101.7077 0001: Description - Microsoft Remote Display Adapter 0001: DriverVersion - 10.0.19041.5794 0002: Description - Microsoft Remote Display Adapter 0002: DriverVersion - 10.0.19041.5794 OS Name: Windows 10 Pro (64-bit) OS Version: 22H2 OS Build: 19045.6456 Current ANSI codepage: 1252 Plugins: ComparePlus (2.2) ElasticTabstops (1.5) JSMinNPP (1.2312) mimeTools (3.1) NppConverter (4.7) NppExport (0.4) PlantUMLViewer (1.9.0.13) PythonScript (2) XMLTools (3.1.1.13) -
@dfs said in Dark Mode style for UDL:
I wondered if it is possible to modify the style for the dark mode the same way it works for the included languages
You define two separate UDL (two separate files), one with your light colors, one with your dark colors. Then, as is done in markdown._preinstalled_DM.udl.xml (which comes preinstalled when you get N++), you set
darkModeTheme="yes":<UserLang name="Markdown (preinstalled dark mode)" ext="md markdown" darkModeTheme="yes" udlVersion="2.1">(yours would, of course, have the name and extensions appropriate for your UDL)
When you have both those UDL in Notepad++, then when it’s in Dark Mode, it will use the settings from the UDL with
darkModeTheme="yes", and when in Light Mode, it will use the settings from the UDL without that attribute (or with that attribute set to"no", IIRC).