I think the wikipedia article you are looking for is actually this one:
ANSI escape code - Wikipedia, the free encyclopedia
Example usage:
Code:
#include <iostream>
#define CSI "\033["
#define RESET CSI"0m"
#define BOLDRED CSI"1;31m"
#define GREEN CSI"32m"
using namespace std;
int main(void) {
cout << BOLDRED << "Hello " << GREEN << "world" << RESET << " [normal]" << endl;
return 0;
}
Should output:
Hello world [normal]
Notice that bold stays on from the first sequence until reset -- try defining GREEN as CSI"0;32m".