Example code for https://solarianprogrammer.com/2019/04/08/c-programming-ansi-escape-codes-windows-macos-linux-terminals/
Note
The master branch has some improvements versus the code presented in the article (like function inlininig). If you want to see the exact code used in the article check https://github.com/sol-prog/ansi-escape-codes-windows-posix-terminals-c-programming-examples/tree/article