I have encountered an issue that I have not been able to find documented elsewhere online. I have been a long-time iTerm2 user, and I would like to report what appears to be a bug related to iTerm2’s tmux integration and color presets.
My environment is as follows:
* macOS Sonoma 14.8.7
* iTerm2 Build 3.6.1
* Local zsh: zsh 5.9 (x86_64-apple-darwin23.0)
* Remote zsh: zsh 5.9 (x86_64-ubuntu-linux-gnu)
* Remote tmux: tmux 3.4
I recently wanted to change my iTerm2 color scheme and found a preset that I liked on GitHub:
https://github.com/aseom/dotfiles/blob/master/osx/iterm2/papercolor-light.itermcolorsAfter downloading and importing the `papercolor-light.itermcolors` preset into iTerm2, everything worked very well in my local terminal. The overall appearance, including command colors, directory paths, and the terminal background, matched the preset correctly.
I then connected to a remote server using SSH. At this point, the colors still appeared correct and were consistent with my local terminal.
However, I also frequently use iTerm2’s tmux integration. When I attach to an existing tmux session using the following command:
```bash
tmux -CC attach -d -t t
```
the color scheme changes unexpectedly. It appears that the PaperColor preset is no longer being applied correctly after entering tmux control mode.
I have attached a screenshot showing three iTerm2 windows for comparison:
* The left window shows a local shell after running `ls` in a directory.
* The middle window shows an SSH session connected to the remote server, before entering tmux, after running `ls` in a similar directory.
* The right window shows the same remote environment after attaching to tmux using iTerm2 integration.
The left and middle windows have nearly identical color rendering. This includes the background color of the sidebar or tab area, the colors of the `ls` output, and the color of the directory path in the shell prompt.
However, after attaching to tmux, several colors change:
* The left sidebar becomes bright white.
* The directory path color in the shell prompt changes.
* The colors of the `ls` output also change.
* Overall, the PaperColor preset appears to be ignored or replaced by another color configuration.
I have already tried several possible solutions, including upgrading tmux and modifying my tmux configuration, but none of them resolved the issue.
Since the colors work correctly both locally and over a normal SSH session, and the problem only occurs after entering iTerm2’s tmux integration mode, I suspect that this may be related to how iTerm2 applies profiles or color presets to tmux integration windows.
