Synesthesia updates your iTerm2 tab colours depending on the go module name in your directory ancestry.
go install github.com/roryq/synesthesia@latest
Add the following line to your ~/.config/fish/config.fish
:
synesthesia hook fish | source
Add the following line to your ~/.zshrc
eval "$(synesthesia hook zsh)"
Navigate between your directories as usual. When you have multiple tabs open for different go projects, a consistent random colour will be chosen for any tabs with the same go module name.