Outputting Coloured Text to Linux Terminals
Ansi colour codes can be used to print coloured text to terminals that support them. If the terminal does not support these codes, they will appear as unintended characters.
ANSI Colour Code Syntax
Example code to print bold red text:
cout << "3[1;31mbold red text3[0m\n";
Here,
The above is the detailed content of How Can I Output Colored Text to a Linux Terminal?. For more information, please follow other related articles on the PHP Chinese website!