Mac – Solarized background colour off in emacs under tmux

emacssolarizedtmux

Exhibit I: plain Emacs.

Plain Emacs.

Exhibit II: Emacs under tmux.

Emacs under tmux.

The shades of colours are different, and importantly, the background colour differentiation is nil (e.g. look at the top menu). Anyone run into this?

I'm running tmux as tmux -2, $TERM in tmux is screen-256color, I'm using color-theme-solarized dark in Emacs, and Solarized for iTerm2 … a bit baffled!

Best Answer

I was having the same issue in Vim. Using the following in my ~/.tmux.conf worked for me after creating a new tmux session:

set -g default-terminal "screen-256color"

Related Question