If you want to manage a set of tab/pid related settings, you could do something like this (untested):
Code:
function mod=%@eval[%1-%2*%@int[%1/%2]
switch %@mod[%_pid, %NumInSet]
case 0
rem set colors for set item 0
case 1
rem set colors for set item 1
case ... up to num in set -1 or
default
rem set some default colors
endswitch
That would use the unique PID of the TCC session to select a different one from a set of colors you have created. If you prefer something a little more orderly, you could track the TCC tab id as it is created and use that instead of %_pid.
To track my TCC shells as created, I use this:
Code:
REM In start btm, set shellcount for TCC # and use alias/shralias to track across TCC processes
set /a ShellCount=%@word[-0,%@alias[Shells]]+1
alias Shells=%@alias[Shells] %ShellCount%.
REM In exit btm, remove TCC # shellcount value from shells alias
alias Shells=%@trim[%@replace[ %ShellCount.,,%@alias[Shells]]
In the mod function call above, you could then use %ShellCount instead of %_pid. That would let the colors be selected more predictably.
This might not have all of the features you want, but it should have some of them.