I see - I hadn’t read the source of termcolor, thanks for clarifying.
What I’d like is a single library for handling terminal activity, using something like the capabilities that I’m messing about with to let the programmer know what functionality is available.
I’d like the programmer not to have to really know anything about the history of vt100s etc.
The way I see this happening is to have a single Terminal struct that delegates methods to different internal structs depending on what is available, as you say in your post, but doing this for the programmer.
You can do some filtering at compiletime, as in winterm, and some at runtime.
I’d like this to include commands/sequences for moving the cursor/etc besides color. You could then build a really nice cross-platform TUI toolkit for quickly knocking up user interfaces that will work anywhere.