How to change font colours on Babun in Windows / Cgywin

colorscygwin;oh-my-zshthemes

I have installed Babun http://babun.github.io/ on Windows

I think I would like to use the (default) "babun" theme, as it has good stuff like git branch names etc.

I would prefer a black-on-white colour scheme to a white-on-black scheme though.

I have changed the background colour to white and the foreground colour to black in the "looks" options menu on the terminal emulator window, which has gotten me 90% of the way there.

Unfortunately, now yellow text is unreadable as the yellow was presumably chosen by the "babun" theme to be readable on a black background, so is too pale.

How can I fix this?

I have been reading the babun docs and poking about in my ~/.* files for a while, but I haven't managed to figure this out πŸ™

Best Answer

Babun already incorporates the terminal I was going to suggest you install (mintty), which implements more recently supported than PuTTYcyg, which implements a PuTTY wishlist item. IMHO, this is easily the best terminal emulator available for Windows. (Actually, it appears the Cygwin community has also concluded this; is mintty now the default for Cygwin too? Nice!)

Any reasonable terminal emulator will let you change its colors. In mintty, it's in the "Looks" section:

mintty options dialog

I can't say I've ever used mintty or Babun, but presumably one of those buttons has what you're looking for. (The above image was taken from the babun website.)

See also this Stack Overflow question on changing colors in Cygwin terminals, which among many answers for different terminal emulators (including CMD.exe, which I strongly advise against), has an answer for rxvt, where you'd want a line in ~/.Xdefaults that says Rxvt*color3: #eeaa11

Update: The "Color Scheme Designer" button goes to a website of some sort and the Theme drop-down may initially be empty. There's a nice 4bit Terminal Color Scheme Designer out there (possibly even the destination of that button?) which can be used to create a theme.

To save you the effort, I've created a very basic theme, which I believe you merely need to add to your ~/.minttyrc file (which may not yet exist):

BackgroundColour=255,255,255
ForegroundColour=0,0,0
CursorColour=0,0,0
Black=0,0,0
BoldBlack=38,38,38
Red=255,51,102
BoldRed=255,153,179
Green=102,255,51
BoldGreen=179,255,153
Yellow=255,204,51
BoldYellow=255,230,153
Blue=51,102,255
BoldBlue=153,179,255
Magenta=204,51,255
BoldMagenta=230,153,255
Cyan=51,255,204
BoldCyan=153,255,230
White=217,217,217
BoldWhite=255,255,255

(I created this with Dye = color, Background = bright_white, Foreground = black, then Hue was moved from the center half way to the left extreme and Saturation was maxed out to the right.)

You can use the "Foreground" button's color selector to refine the Red, Green, and Blue channels from the above Yellow or BoldYellow as desired. Update the corresponding line in ~/.minttyrc and hit "Cancel" in that color selector (or else your default color would become that yellow).

I assume changes will require starting a fresh instance of the terminal. It's possible that they actually require resetting some sort of ~daemon, in which case you might have to reboot (though I doubt it).

Related Question