meaning - git bash theme windows




How to change RGB colors in Git Bash for windows? (6)

2017 Update Open Gitbash and click the icon in the upper left corner and select "Options"

From the options menu you can configure transparency, foreground color (text), background color, and cursor color. Pretty straightforward and easy.

I'm using the Git Bash in Windows and for the purposes of my custom git log format, I'd like to modify the terminal's exact RGB color values so I can fine-tune the color outputs. My git log format is as follows in my global .gitconfig:

lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset)%x09%C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset) %C(dim white)%an%C(reset) - %C(white)%s%C(reset)' --branches --remotes --tags

I'd like to define in Git Bash what RGB value actually maps to 'blue', for example. Any idea how I can do this? Step by step instructions would be wonderful. Thanks in advance.

EDIT

I setup my .bashrc and it isn't working for some reason. Colors aren't changing :-(. Here is a script I ran to see colors: http://pastebin.com/9EsYmGCj and the result: http://i.imgur.com/1dJ3o1a.png


Windows10 + GitBash: Warning Message Samples


The following samples will print out a red background with white text.

Original colors are RESTORED after the print.


Echo One Line Message:

MSG="MY_WARNING_MESSAGE_TEXT" BG="41m" FG="1m"
echo -en "\033[$FG\033[$BG$MSG\033[0m\n"

Block Of Colored Text with HARDCODED message:

BG="41m" FG="1m"
HD_CAT_VAR=$(cat << 'HEREDOC_CAT_VAR_REGION'
+-------------------------------------+
|                                     |
|     HARD_CODED_WARNING_MESSAGE      |
|                                     |
+-------------------------------------+
HEREDOC_CAT_VAR_REGION
)
echo -en "\033[$FG\033[$BG$HD_CAT_VAR\033[0m\n"

Block of Colored Text with VARIABLE message:

VARIABLE_WARNING_MESSAGE="OH_NOOOOOO!"
BG="41m" FG="1m"
HD_CAT_VAR=$(cat << HEREDOC_CAT_VAR_REGION
+-------------------------------------+
|                                     |
+-------------------------------------+
      $VARIABLE_WARNING_MESSAGE        
+-------------------------------------+
|                                     |
+-------------------------------------+
HEREDOC_CAT_VAR_REGION
)
echo -en "\033[$FG\033[$BG$HD_CAT_VAR\033[0m\n"

If you are using the git-bash command prompt check if you have the file: %USERPROFILE%\.minttyrc
In that file you can fine tune the RGB values of the console colors in this way:

BoldBlack=128,128,128
Red=255,64,40
BoldRed=255,128,64
Green=64,200,64
BoldGreen=64,255,64
Yellow=190,190,0
BoldYellow=255,255,64
Blue=0,128,255
BoldBlue=128,160,255
Magenta=200,64,255
BoldMagenta=255,128,255
Cyan=64,190,190
BoldCyan=128,255,255
White=200,200,200
BoldWhite=255,255,255

Since those color names are linked to ANSI escape codes (as I mentioned in a previous answer), you can try the approach described in this issue:

Just add these to your .bashrc

echo -ne "\e]4;4;#007fff\a"  # 4;4 is Dark Blue #005FFF

(pick an rbg value which seems more readable to you for color blue, or choosing from this palette)



When using MSYSGIT, Git Bash runs in the Windows Command Prompt. Consequently, it uses the colors defined for the terminal. Since Git Bash is a command that is always run, you can set its colors in the Command Prompt's Properties, rather than Defaults.

For instructions on changing the terminal colors, see: https://superuser.com/questions/199764/how-to-change-the-default-color-of-the-command-prompt


Note: I've found the Command Prompt's color options to be a huge pain to configure, as they frequently changed/reset while editing. The trick seems to be to tab out of the input boxes after editing.







msysgit