C-chat
Functions
console-color.h File Reference

API to control text color in console. More...

#include "../common/interop.h"

Go to the source code of this file.

Functions

void setTextColor (unsigned int colorCode)
 Sets output text color. More...
 
void resetColor ()
 Set output text color to white. More...
 

Detailed Description

API to control text color in console.

Function Documentation

◆ resetColor()

void resetColor ( )

Set output text color to white.

We're assuming default text color is white. It isn't the case for all terminals. If you wan't consistency, this function must be called at the start of your program before any console output.

◆ setTextColor()

void setTextColor ( unsigned int  colorCode)

Sets output text color.

Parameters
colorCodeThe new color for the text (see defined macros)