Commit e8d8420c authored by Chris Müller's avatar Chris Müller
Browse files

add unix_colors.h for all ANSI escape codes / color output

parent 8ccf53d6
#ifndef CRYSTAL_UNIXCOLORS_H
#define CRYSTAL_UNIXCOLORS_H
// Colors without bold attribute
#define CRY_NORMAL "\x1B[0m"
#define CRY_BLACK "\x1B[0;30m"
#define CRY_RED "\x1B[0;31m"
#define CRY_GREEN "\x1B[0;32m"
#define CRY_BROWN "\x1B[0;33m"
#define CRY_BLUE "\x1B[0;34m"
#define CRY_MAGENTA "\x1B[0;35m"
#define CRY_CYAN "\x1B[0;36m"
#define CRY_LIGHTGRAY "\x1B[0;37m"
// Colors with bold attribute
#define CRY_DARKGRAY "\x1B[1;30m"
#define CRY_DARKRED "\x1B[1;31m"
#define CRY_DARKGREEN "\x1B[1;32m"
#define CRY_YELLOW "\x1B[1;33m"
#define CRY_DARKBLUE "\x1B[1;34m"
#define CRY_DARKMAGENTA "\x1B[1;35m"
#define CRY_DARKCYAN "\x1B[1;36m"
#define CRY_WHITE "\x1B[1;37m"
// Colors without bold attribute
#define CRY_BG_BLACK "\x1B[0;40m"
#define CRY_BG_RED "\x1B[0;41m"
#define CRY_BG_GREEN "\x1B[0;42m"
#define CRY_BG_BROWN "\x1B[0;43m"
#define CRY_BG_BLUE "\x1B[0;44m"
#define CRY_BG_MAGENTA "\x1B[0;45m"
#define CRY_BG_CYAN "\x1B[0;46m"
#define CRY_BG_LIGHTGRAY "\x1B[0;47m"
// Colors with bold attribute
#define CRY_BG_DARKGRAY "\x1B[1;40m"
#define CRY_BG_DARKRED "\x1B[1;41m"
#define CRY_BG_DARKGREEN "\x1B[1;42m"
#define CRY_BG_YELLOW "\x1B[1;43m"
#define CRY_BG_DARKBLUE "\x1B[1;44m"
#define CRY_BG_DARKMAGENTA "\x1B[1;45m"
#define CRY_BG_DARKCYAN "\x1B[1;46m"
#define CRY_BG_WHITE "\x1B[1;47m"
#endif // CRYSTAL_UNIXCOLORS_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment