I just switched back to Linux after a few years of Windows use and am wondering if ANSI Escape Sequences are okay for coloring text. I ask because the way I did it on windows isn't capable of crossing platforms because of the use of windows.h.Someone had mentioned NCurses or something but didn't explain it to me. Would this be a good alternative? Is there any negative aspects of NCurses or ANSI esc? Sorry if this question is dumb, I'm still a newbie.This was the code I used for colored text on windows.int setColor(const int foreground, const int background){    int Color = foreground + (background * 16);    HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);    SetConsoleTextAttribute(hConsole, Color);    return 0;}Thanks,xChubz
Are ANSI* Escape Sequences Proper For Coloring Text in Terminal(Linux)?
c++;linux
ANSI escape sequences aren't supported by all terminals; the most common case you'll come across is a remote session that doesn't support color, where the terminal emulatior will attempt to display the color escape sequences. You definitely should be using a terminal/textual user interface (TUI) library (you may also see them called console user interface (CUI) libraries). Ncurses (or curses, its predecessor) is one such, but isn't the only one; newt is another. There are also terminal capabilities libraries, such as termcap and terminfo (the latter has generally supplanted the former), which contain terminal control sequences. Ncurses (and other TUI libs) use terminfo.TUI libs provide not only cross-terminal portability, but cross-platform, as some libs (including ncurses) have been ported to Windows.The trade-off is a certain type of complexity, but you'll also be getting rid of a different (and much less manageable) complexity (dealing with different terminal capabilities).