How do I change the unreadable dark blue color Cygwin uses for directories?

24

10

I'd like to change the blue color that Cygwin uses for directories. It is too dark to read on most screens.

axiomx11

Posted 2012-07-03T19:41:14.770

Reputation: 353

3

echo -ne '\e]4;4;#00BFBF\a' # blue

Running that command in the terminal will change the color to cyan, if you are using mintty

You can change all of the colors: http://code.google.com/p/mintty/wiki/Tips#Changing_colours (Will move to answer when rep allows.)

– axiomx11 – 2012-07-03T19:43:25.967

1Cygwin's ls doesn't use color 4 (dark blue) for directories, but color 12 (bold blue). Are you remoting to some other system? – ak2 – 2012-07-04T12:27:03.663

Answers

6

You probably get the colors from ls itself. You get this from invoking it as ls --color. You can either disable this alias, or you can change the colors. I find the colors useful, so I change the colors.

There are defaults, but you can override these by use of the LS_COLORS environment variable. You can set this manually, or you can use the tool dircolors to help you.

Rich Homolka

Posted 2012-07-03T19:41:14.770

Reputation: 27 121

For the curious: This not only works in Cygwin, but also on the Linux shell. So it might be useful for xterm users, too ;) – Izzy – 2012-07-03T22:17:24.620

Yes, I found the colors were coming from my remote CentOS server.

I put a copy of /etc/DIR_COLORS in my home directory, and changed DIR 01;34 # directory.

– axiomx11 – 2012-07-05T13:52:28.487

39

If you're using MinTTY (which you almost certainly are, unless you know you're doing something special), the easiest method is to change your MinTTY settings. You can do this by editing your ~/.minttyrc file.

Try running the below, then restarting MinTTY:

echo 'Blue=127,127,255' >> ~/.minttyrc
echo 'BoldBlue=191,191,255' >> ~/.minttyrc

This will work for everywhere that blue colour turns up, not just in the results from ls.

me_and

Posted 2012-07-03T19:41:14.770

Reputation: 2 118

Excellent, thank you so much. That was annoying. – Grant Bowman – 2015-07-02T19:58:06.827

1I had blue comments in vim as well, which this fix remedies. – Alexander Torstling – 2013-04-12T08:23:53.137

4

There is also a command line option --option that allows you to change colours

E.g. The following changes the blue to something more readable

C:\cygwin\bin\mintty.exe --option Blue=128,128,192 -i /Cygwin-Terminal.ico -

SyntaxGoonoo

Posted 2012-07-03T19:41:14.770

Reputation: 141

0

Another way of looking at this problem is that the default "Dark Blue" color used by CMD Powershell Bash etc. on Windows is too dark. You can change it by:

  • Click the top right icon
  • Click Properties
  • Click the Colors tab
  • Select the 2nd Dark Blue color
  • Change Blue: 128 to 255
  • Hit tab to save the value
  • Select the original background color (Usually black)
  • Click OK

Shanteva

Posted 2012-07-03T19:41:14.770

Reputation: 289