How To Print With Color In Linux Terminal

The proper (and slower ?) way to do this is using ncurses or similar libraries. Here We’ll talk about a “quick and dirty” method using control characters.

There are special characters, referred to as “control characters“, which, when read by the the console, make it change the way it displays text.

The general format of these control characters is:

ESC[{attr1};…;{attrn}m

Where:

Continue reading →