Introducing Colored: the most simple way to add colors in your term!

It does seem that Windows 10 has vt100 escape code emulation, as it is already documented on MSDN: Console Virtual Terminal Sequences - Windows Console | Microsoft Docs

Of course this is only usable with the latest version of Windows 10, so the huge amount of people still on Windows 7 and 8 won't be able to take advantage of this.

I suppose what @DanielKeep could do is try setting the console mode of the output to include the ENABLE_VIRTUAL_TERMINAL_PROCESSING flag. If it works, then his library can just allow the output full of escape codes to go through without having to hook anything. If it fails then he'd have to figure out how to hook libstd's stdout and replace escape codes with API calls.

An interesting thing to note is I noticed this flag in the Windows SDK back in November 29 2015 and commented on it on IRC. At that time there still wasn't any documentation on it though, nor anything on the internet really, just that flag sitting in wincon.h with no explanation.

2 Likes