Presenting another script from the useless script department — dog
!
It has an in-built (and rather quirky) state-machine style parser, which will emit the color defined on entering the new state.
The syntax is stupid easy - and hopefully easy enough to write.
Perhaps (given some time) I’ll turn this into something, well, useful.
Code’s on github, but very buggy and stuff. Also hard-coded.
Enjoy!