It seems that tmux-2.1 (released October 18, 2015) now allows you to specify the colors of individual panels. From the change log :
* 'select-pane' now understands '-P' to set window/pane background colours.
for example, [from the manual] to change the foreground of panel 1 (text) to blue and the background to red:
select-pane -t:.1 -P 'fg=blue,bg=red'
To simulate the iTerm color scheme:
To answer the original question, I use the following lines in my ~/.tmux.conf to set the background / foreground colors to mimic the behavior in iTerm :
#set inactive/active window styles set -g window-style 'fg=colour247,bg=colour236' set -g window-active-style 'fg=colour250,bg=black'
I have not seen the window-style and window-active-style commands before, but maybe they were available in previous versions of tmux.
In addition, these two lines are very useful for simple separation of panels:
bind | split-window -h bind - split-window -v
EDIT : as Jamie Schembri mentions in the comments, tmux version 2.1 (at least) will now be installed with:
brew install tmux
EDIT (October 2017) : brew now installs tmux 2.6, and the above still works.
EDIT Vim panels : If you find that inactive coloring does not work with the Vim panel, this may be due to the color scheme you are using. Try the pablo scheme; i.e. in the Vim panel:
:colo pablo
To make it work with your own custom Vim color ctermbg , make sure that the " Normal selection" parameter is not ctermbg or guibg . For example, "inactive coloring" does not work with murphy , because there is a line in murphy.vim :
hi Normal ctermbg=Black ctermfg=lightgreen guibg=Black guifg=lightgreen
this installs ctermbg or guibg to Black . However, changing this line to:
hi Normal ctermfg=lightgreen guifg=lightgreen
make "inactive coloring" work.
EDIT July 2019 Augusto provided a good suggestion for changing the background color for line numbers. In my vim colourscheme, I use the following:
hi Normal guifg=