Not sure how I went down this rabbit hole, but I ended up creating a VSCode inspired theme for iTerm2 and tmux (VSCode default dark theme).

TL;DR

Source here:
https://gist.github.com/itaysk/6957eab43957c83f56554ffdcced4100

Result looks like this:
result

Finding VSCode’s colors

Using the Theme Color Reference, I found the colors in the source at:

Some interesting pointers at:

  • editor.background
  • editor.foreground
  • statusBar.background
  • statusBar.foreground
  • statusBarItem.activeBackground
  • editorGroup.border

Note that for the statusBarItem.activeBackground style, there’s a transparency factor. Since tmux doesn’t support colors with alpha channel, I found the matching opaque color hex for that shade.

There’s also the ANSI basic colors palette which is redefined at:

Tmux

tmux has some nice configuration options around it’s look and feel. Just search for colour in the man page and you’ll find the following settings:

  • window-active
  • window
  • pane-border
  • pane-active-border
  • status
  • window-status
  • window-status-current

Remember that the terminal is 256 colors, so using a hex color will make tmux approximate the closest available color. Eventually I preferred to pick colors by hand. I did consult hexterm, and some other tools, but eventually resorted to this 256 color map and picked the colors that looked good to my eye.

(put that in your .tmux.conf file)

iTerm2

For iterm it’s a plist xml. I created a very simple script to convert the hex colors to RGB values, and build the XML:

(load that from iTerm2 Preferences->Profiles->Colors->Color Presets…->Import…)