How to Remove Black Background From Windows Terminal when Using Cmder

How to Remove Black Background From Windows Terminal when Using Cmder
2 min read Tue Jul 19 2022

I recently found out about Windows Terminal, a multi-tabbed terminal emulator for Windows. It also allows you to easily add other terminals to it. Since I was using Cmder, I wanted to add it to Windows Terminal and fortunately, I found a tutorial for that.

However, after opening Cmder on Windows Terminal, I found a bug, there was a black background on the text.

black-background-windows-terminal

screenshot of the bug🔼


After searching, I finally found a solution.

To solve this bug, follow the following steps.

  1. Navigate to the root folder of your Cmder application.
    This might be “C:\Program Files\Cmder” or any directory depending on how you installed the application.
  2. Then navigate to the config directory
  3. Inside the directory, there is a file named “cmder_prompt_config.lua”, open this file with a code editor or any text editor of your choice.
  4. Make these changes to the “Prompt element colors” and replace all the 40s with 49.
    Before
-- Prompt Element Colors
uah_color = "[1;33;40m" -- Green = uah = [user]@[hostname]
cwd_color = "[1;32;40m" -- Yellow cwd = Current Working Directory
lamb_color = "[1;30;40m" -- Light Grey = Lambda Color
clean_color = "[1;37;40m"
dirty_color = "[33;3m"
conflict_color = "[31;1m"
unknown_color = "[37;1m" -- White = No VCS Status Branch Color

After

-- Prompt Element Colors
uah_color = "[1;33;49m" -- Green = uah = [user]@[hostname]
cwd_color = "[1;32;49m" -- Yellow cwd = Current Working Directory
lamb_color = "[1;30;49m" -- Light Grey = Lambda Color
clean_color = "[1;37;49m"
dirty_color = "[33;3m"
conflict_color = "[31;1m"
unknown_color = "[37;1m" -- White = No VCS Status Branch Color
  1. Restart Windows Terminal and your problem should be solved.

Please share if you found it useful 😄