Using ncurses in C++, how would I colour my text in a console/terminal without breaking MinGW support? Are there any other libraries that can do this? I know that you can do it with ASCII characters, but this isn't fully supported. I don't want to use the Windows API.
The discussion in the other answer is regarding Windows, so for the benefit of Win readers, I'm leaving this answer even though it is not cross-platform.
The Old New Thing blog covers some of the Win32 API that can be used to change text color in the console. See FillConsoleOutputAttribute and Console Screen Buffers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With