A small implentation for C which allow you to print messages colored. Its working with the Win API.
ColorPrint(COLORCODE, "text\n");
ColorPrint(GREEN, "Hello World\n")
Color code | Color |
---|---|
BLACK | Black |
BLUE | Dark blue |
GREEN | Dark green |
RED | Dark red |
VIOLET | Violet |
YELLOW | Yellow |
LGREY | Light grey/gray |
GREY | Grey/gray |
LBLUE | Light blue |
LGREEN | Light green |
LCYAN | Light cyan/teal |
LRED | Light red |
LVIOLET | Light violet/pink |
LYELLOW | Light yellow |
WHITE | White |
Color code | Alias |
---|---|
LVIOLET | PINK |
CYAN | TEAL |
LCYAN | LTEAL |
LGREY | SILVER |
YELLOW | OLIVE |
Here is a display output:
Windows:
gcc main.c -o cprint.exe
Linux (cross-compile):
i686-w64-mingw32-gcc main.c -o cprint.exe