From: slack Date: Thu, 2 Apr 2009 13:01:16 +0000 (+0200) Subject: ansi.h X-Git-Url: http://slack.codemaniacs.com/git/?a=commitdiff_plain;ds=sidebyside;p=misc-cpp-utils.git ansi.h --- 6ff78f05fccda0073715bc568da851f04e0eac93 diff --git a/ansi.h b/ansi.h new file mode 100644 index 0000000..f2f0ac9 --- /dev/null +++ b/ansi.h @@ -0,0 +1,45 @@ +#ifndef ANSI_H +#define ANSI_H + +namespace ANSI +{ + const char FG_BLACK[]="\x1b[30m"; + const char FG_BLACK[]="\x1b[30m"; + const char FG_BRIGHT_BLACK[]="\x1b[1;30m"; + const char FG_RED[]="\x1b[31m"; + const char FG_BRIGHT_RED[]="\x1b[1;31m"; + const char FG_GREEN[]="\x1b[32m"; + const char FG_BRIGHT_GREEN[]="\x1b[1;32m"; + const char FG_YELLOW[]="\x1b[33m"; + const char FG_BRIGHT_YELLOW[]="\x1b[1;33m"; + const char FG_BLUE[]="\x1b[34m"; + const char FG_BRIGHT_BLUE[]="\x1b[1;34m"; + const char FG_MAGENTA[]="\x1b[35m"; + const char FG_BRIGHT_MAGENTA[]="\x1b[1;35m"; + const char FG_CYAN[]="\x1b[36m"; + const char FG_BRIGHT_CYAN[]="\x1b[1;36m"; + const char FG_WHITE[]="\x1b[37m"; + const char FG_BRIGHT_WHITE[]="\x1b[1;37m"; + const char FG_RESET[]="\x1b[0;39m"; + + const char BG_BLACK[]="\x1b[40m"; + const char BG_BRIGHT_BLACK[]="\x1b[1;40m"; + const char BG_RED[]="\x1b[41m"; + const char BG_BRIGHT_RED[]="\x1b[1;41m"; + const char BG_GREEN[]="\x1b[42m"; + const char BG_BRIGHT_GREEN[]="\x1b[1;42m"; + const char BG_YELLOW[]="\x1b[43m"; + const char BG_BRIGHT_YELLOW[]="\x1b[1;43m"; + const char BG_BLUE[]="\x1b[44m"; + const char BG_BRIGHT_BLUE[]="\x1b[1;44m"; + const char BG_MAGENTA[]="\x1b[45m"; + const char BG_BRIGHT_MAGENTA[]="\x1b[1;45m"; + const char BG_CYAN[]="\x1b[46m"; + const char BG_BRIGHT_CYAN[]="\x1b[1;46m"; + const char BG_WHITE[]="\x1b[47m"; + const char BG_BRIGHT_WHITE[]="\x1b[1;47m"; + const char BG_RESET[]="\x1b[0;49m"; +} + +#endif +