Is it possible to change the background colour of text in NP++?

  • I always wanted to use one of Notepad’s many theme available, preferably one of the dark themes, but I currently can’t because they all suffer from similar issues that I can’t seem to get rid of.

    The issue is that no matter what theme I select, that the backgrounds of the letters always stay white and the text stays black (or in certain cases has a different colour). In addition is the line I have selected also a colour usually unfitting for my needs.
    I already found a post, which gives some advice on how I can change the colour of the currently selected line, but the text seems unchangeable.

    Here is an image to show my current problem:

    I hope that someone can give me a helping hand in this matter as this white background stuff is really not what I would call a dark theme…

  • @Andre601 ,

    A couple things you don’t show: what’s the file type (“language”) of the currently-active document, and what your Settings > Style Configurator > Global Styles > Global Override settings are.

    If you have global overides checkmarked (my screenshot, below, does not), then that may mess up your background color unexpectedly. But given your screenshot, I don’t think that’s the problem.

    Regaring file type/language: Your Style Configurator is showing the colors for the “Search Result” type, but it doesn’t look like you have the search-results panel shown. It actually looks more like Markdown inside of something like a Hugo or other content-management system for making a website.

    Example with it working with the “Obsidian” them but not in Dark Mode (so UI is white, but edited text is obsidian). With a “plain text” file, it works right:


    If I switch to Language > Markdown (preinstalled), it wil look similar to what you show:

    This is because the User Defined Languages, like Markdown (preinstalled), are not theme aware. You have to modify your UDL colors to match the theme.

    However, if you have a recent Notepad++ (v8.1.3 or newer), it will come with a second Markdown UDL, called Markdown (preinstalled dark mode), which will be closer to what you want for editing.

    If you want to use that variant of the Markdown UDL, then make sure that Language > User Defined Language > Define Your Language has your Markdown extensions set for the Markdown (preinstalled dark mode)
    … but not set for the Markdown (preinstalled) (just clear out that Ext. box). Or go into userDefineLangs\ folder and delete the markdown._preinstalled.udl.xml, making sure to keep the dark mode version markdown._preinstalled_DM.udl.xml

    However, that UDL variant still doesn’t quite match your Obsidian theme; that’s because it was designed to match the colors of the v8.0-and-newer Dark Mode in Notepad++ (Settings > Preferences > Dark Mode), so the background colors still aren’t exactly the same as obsidian. Again, you could edit the UDL color settings to match Obsidian (and it might be easier, because it’s starting from a dark theme already, so it’s starting closer to obsidian). or, if you’ve got v8.1.3 or newer, you could just use the Notepad++ Dark Mode and default Dark Mode theme, which will match the markdown (preinstalled dark mode) UDL already.

    If you don’t have Notepad++ v8.1.3 or newer, you could either upgrade (it’s free!) or you can download the UDL file from the github repo here and put it in your userDefineLangs folder.

Log in to reply