65

I haven't been able to apply any color scheme to iTerm2.

It looks like that the Basic Colors are applied, but the ANSI Colors are not (as shown in Preferences>Profiles>Colors).

Using Mac OSX 10.7.2. Any help?

8 Answers8

110

I've been having the same issue and this is what seems to have solved it:

In your .bash_profile set CLICOLOR before setting TERM:

# Set CLICOLOR if you want Ansi Colors in iTerm2 
export CLICOLOR=1

Set colors to match iTerm2 Terminal Colors

export TERM=xterm-256color

save bash file and source:

source ~/.bash_profile 

Then, in your iTerm2 Preferences > Profiles > Terminal > Report Terminal Type, set to either xterm-256color or xterm

Close iTerm2, restart it and type ls. That did the trick for me.

Good luck.


Catalina and ZSH

If using ZSH, which is the default shell in Catalina and later, use ~/.zprofile, instead of ~/.bash_profile.

peelman
  • 4,891
sam3k
  • 1,116
45

this is a really old question, but make sure your Preferences -> Profiles -> Colors -> Minimum contrast setting is not at the max... if it is and you've done what is suggested above, slide it to a lower setting and you should see the colors appear.

Rok
  • 561
19

I had the same problem and found a solution: Profiles -> Colors -> Minimum Contrast. If it's high, then you only get black and white.

Jawa
  • 3,679
3

If you are using zsh and @sam3k answer didn't work for you - you should put those lines in .zshrc instead of .bash_profile

Gendos-ua
  • 131
  • 3
0

Several answers have mentioned the contrast setting. Even at about 60% of the way across my ANSI blue turned black.

Crank the contrast down before you look for other solutions; it is way more aggressive than I expected.

arp
  • 97
0

If both modifying .zshrc and turning down minimum contrast DIDN'T WORK, then also make sure that Cursor Boost value is small enough.

Y F
  • 1
0

Added:

export CLICOLOR=1
export TERM=xterm-256color

To the following file:

~/.zshrc

I saved this and then I ran:

source ~/.zshrc

The color scheme was then applied.

Please not you will need to run the source command for every terminal window that was already open before you made the changes in the .zshrc file.

0

I had the same issue but had to change a Mac OS Preference for the color scheme to be persisted.

Opening 'System Preferences' and unchecking the 'Close windows when quitting an app' radio button worked for me.