Color Terminal C at Color

Color Terminal C. Colors must be written in all caps, or expressed as a numeral #include<stdio.h> #include<conio.h> main () { textcolor (red); Welcome to termcolor c++ library¶.

colors Colorizing text in the console with C++ Stack Overflow
colors Colorizing text in the console with C++ Stack Overflow from stackoverflow.com

If you want a customized set of colors, you can use dircolors for that. Let’s start with a simple c example that will print a green text message on your terminal: You can get the color code by taking the final digit of the ansii code (32 for green foreground, 42 for green background;

colors Colorizing text in the console with C++ Stack Overflow

There are some codes for text styles and colors. Here we are doing anything special into c++ code. Your distribution probably sets ls_colors globally, so all users on your system inherit the same colors. I have the following header included in some of my projects so that i can add a little color to the terminal output.