3

I'm trying to configure my Bash on Ubuntu on Windows color scheme, but I'm having some trouble.

I've tried running the color, and I'm getting incorrect colors:

Trying to use colored text

Any idea why this may be, and how I can change them?

3
  • This would be a setting of whichever terminal emulator you're using
    – muru
    Feb 10, 2017 at 5:37
  • 1
    I am running the default after installing BoUoW, and I'm not entirely sure which terminal or terminal emulator is being used; It looks and feels like cmd.exe, but I've read elsewhere that it's supposedly conhost.exe...? Do you know where I can dig up more info on this? Feb 13, 2017 at 16:54
  • I've been digging around and have tried Cmder as a terminal emulator on top of my bash.exe, and it gives me the options I'm looking for. I am still curious on being able to do this for the default conhost.exe, and I ran across this post on github. Looks like there are some workarounds that I'll try and explore more, but not as simply supported as I had assumed. Feb 13, 2017 at 20:25

1 Answer 1

2

I tried this out today because I was interested, and found it pretty simple to change things. Obviously, things might have been different back when you tried:

  • Right click title bar of the 'Ubuntu' application
  • Click Properties
  • Click the Colors Tab

ubuntu-on-windows-properties

Once here, you see the 16 standard colors (8 + 8 bold) from old terminal days. You may adjust any of these.

Some Notes from me messing around with it:

  • This dialog is very wonky.
  • It's used both to change the color definitions and the selected default for the 4 radio choices shown. Basically, make sure you move the selection back after altering colors
  • There is a bug when you first come into the dialog, or switch the radio button, the values in the RGB entries may not represent what you are actually changing, best to explicitly select your color slot, then change it.

But, that's not all...

I have a color script that I've assembled over the years that you can put in your path on windows and execute it from Ubuntu on Windows as /bin/bash colors. I ran this and here are the results:

color-script

First, it shows that changes to the terminal definition of the 16 colors are working...

But it also shows that the terminal is capable of displaying the full 256 color palette that modern terminals can do. So, you have many options for altering the appearance of your terminal. You can change the base 16 color definitions, or even better (maybe) you can start referencing the full spectrum in your scripts/prompts, etc.

Search the web for 'bash prompt 256 colors' to get you started. Many terminal applications support 256 colors if you look for them.

References:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .