Add some colour to iTerm2

Alan Reid
1 min readJan 10, 2019

--

So in this post we are going to add some color to our terminal of choice, I’m obviously speaking about iTerm 2, but you can add color to others if its supported.

Any way lets begin. Open up iTerm2 and enter --touch ~/.bash_profile; open ~/.bash_profile;. This will open your .bash_profile and allow you to add the following to it.

# bash_profile
if
which rbenv > /dev/null; then eval "$(rbenv init -)"
fi
#Git branch in promp and colours
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
export PS1="@\[\033[33;1m\]\w\[\033[m\]:\[\033[36m\]\$(parse_git_branch)\[\033[m\]$ "
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}

With this added you can now visit https://iterm2colorschemes.com and download color schemes to you iTerm2 interface. For me personally i like Afterglow, and i like to keep it clean and simple. As you can see in the screenshot below.

--

--

Alan Reid

Hi, I'm Alan! Rails developer, with a passion to create well crafted front-end experiences. Founder of Propiti