Once upon a time there was a library for styling text in the console, e.g. for some old school text games, but I can't remember the name, maybe you can find it on google.
You can also use the windows.h library:
void printInColor(const std::string& text, WORD color)
{
HANDLE hConsole =...