AnyBar! I finally found it. And I misremembered; it doesn't run a shell script, it just listens on a UDP port, and a shell script can send it messages to change the color of the dot.
https://github.com/tonsky/AnyBar/
PERFECT for the use case I needed this morning.