I would like to script this process; shell, applescript, etc. However, I cannot seem to find a hook that allows me to change the tab color. Is this possible? Here is a screen shot with an example of what I am trying to achieve.

I write an ssh wrapper script in my ~/bin which makes the tab color changes (and other things like custom background with server names) and uses an EXIT trap to change them back.
–
AaronJun 27 '13 at 18:12