diff options
author | David Phillips <david@sighup.nz> | 2017-11-23 21:25:26 +1300 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2017-11-23 21:26:13 +1300 |
commit | 5c2d70e26a87a3618ab7b8577b2d5de3a2c4a68d (patch) | |
tree | e1647da5721dba2b911301dc8bca0cdcc2e5f284 /colour.h | |
parent | 299d0bb0431e80ce1152908320868c1452ef1080 (diff) | |
download | sand-leek-5c2d70e26a87a3618ab7b8577b2d5de3a2c4a68d.tar.xz |
Format output with gorgeous colours
Diffstat (limited to 'colour.h')
-rw-r--r-- | colour.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/colour.h b/colour.h new file mode 100644 index 0000000..82d41e4 --- /dev/null +++ b/colour.h @@ -0,0 +1,30 @@ +#ifndef SAND_LEEK_COLOUR_H +#define SAND_LEEK_COLOUR_H + +#define ANSI_ESC "\x1b[" +#define COLOUR_BLACK ANSI_ESC"30m" +#define COLOUR_RED ANSI_ESC"31m" +#define COLOUR_GREEN ANSI_ESC"32m" +#define COLOUR_YELLOW ANSI_ESC"33m" +#define COLOUR_BLUE ANSI_ESC"34m" +#define COLOUR_MAGENTA ANSI_ESC"35m" +#define COLOUR_CYAN ANSI_ESC"36m" +#define COLOUR_WHITE ANSI_ESC"37m" + +#define COLOUR_BBLACK ANSI_ESC"1;30m" +#define COLOUR_BRED ANSI_ESC"1;31m" +#define COLOUR_BGREEN ANSI_ESC"1;32m" +#define COLOUR_BYELLOW ANSI_ESC"1;33m" +#define COLOUR_BBLUE ANSI_ESC"1;34m" +#define COLOUR_BMAGENTA ANSI_ESC"1;35m" +#define COLOUR_BCYAN ANSI_ESC"1;36m" +#define COLOUR_BWHITE ANSI_ESC"1;37m" + +#define COLOUR_BOLD ANSI_ESC"1m" +#define COLOUR_BOLD_OFF ANSI_ESC"22m" + +#define COLOUR_OFF ANSI_ESC"39m" + +#define COLOUR_ALL_OFF ANSI_ESC"0m" + +#endif |