Add this line to your.tmux.conf tmux.conf
file
set -g default-terminal "screen-256color"
Add the line below to you shells rc file in mycasemy case its my .zshrc.zshrc
if [[ $TERM == xterm ]]; then TERM=xterm-256color; fi
Add the line below to your .vimrc.vimrc
set t_Co=256
The above configuration works for me, but if this fails try to follow this link for another methor to fix Fixing Vim's Background Color