Why not display color in Iterm2

So I have my gitconfig settings to do colors. In the terminal, it works well and looks good.

However, in iTerm2, all colors will not appear in my gitconfig except for the reverse properties of git that I set. Then they show up, but who likes to invert the colors?

Why does this happen and how can I solve it?

You should check whether iTerm sets the TERM variable correctly. On my system, I see:

echo $TERM
xterm-256color

and it works in git s color. This is set according to the “Report Terminal Type” property in iTerm’s preferences.

You should also check the color tab and make sure the contrast slider is not all the way to the right.

So I have my gitconfig settings to do the colors. In the terminal, it works well and looks good.

However, in iTerm2, all colors will not appear in my gitconfig except for the reverse properties of git that I set. Then they show up, but who likes to invert the colors?

Why does this happen and how can I solve it?

You should check whether iTerm correctly sets the TERM variable. On my system, I see:

echo $TERM
xterm-256color

and it works in git s color. This is set according to the “Report Terminal Type” property in iTerm’s preferences.

You should also check the color tab and make sure the contrast slider is not all the way to the right.

Leave a Comment

Your email address will not be published.