![]() |
MOS Source Code
|
ANSI color codes. More...
Macros | |
| #define | STD_COLOR_LIGHT 0x8 |
| #define | ANSI_COLOR(...) |
| ANSI color codes creator. | |
| #define | ANSI_COLOR_RESET "\033[0m" |
| #define | _ANSI_FG "3" |
| #define | _ANSI_BG "4" |
| #define | _ANSI_COLOR_black "0" |
| #define | _ANSI_COLOR_red "1" |
| #define | _ANSI_COLOR_green "2" |
| #define | _ANSI_COLOR_yellow "3" |
| #define | _ANSI_COLOR_blue "4" |
| #define | _ANSI_COLOR_magenta "5" |
| #define | _ANSI_COLOR_cyan "6" |
| #define | _ANSI_COLOR_white "7" |
| #define | _ANSI_STYLE_regular "0" |
| #define | _ANSI_STYLE_bright "1" |
| #define | _ANSI_STYLE_faint "2" |
| #define | _ANSI_STYLE_italic "3" |
| #define | _ANSI_STYLE_underline "4" |
| #define | _ANSI_STYLE_blink "5" |
| #define | _ANSI_STYLE_blink_fast "6" |
| #define | _ANSI_STYLE_reverse "7" |
| #define | _ANSI_STYLE_invisible "8" |
| #define | _ANSI_COLOR_1(fg) |
| #define | _ANSI_COLOR_2(fg, style) |
| #define | _ANSI_COLOR_3(fg, style, bg) |
| #define | _ANSI_COLOR_N(_1, _2, _3, N, ...) |
Enumerations | |
| enum | StandardColor { Black = 0x0 , Blue = 0x1 , Green = 0x2 , Cyan = 0x3 , Red = 0x4 , Magenta = 0x5 , Brown = 0x6 , Gray = 0x7 , DarkGray = Black | 0x8 , LightBlue = Blue | 0x8 , LightGreen = Green | 0x8 , LightCyan = Cyan | 0x8 , LightRed = Red | 0x8 , LightMagenta = Magenta | 0x8 , Yellow = Brown | 0x8 , White = Gray | 0x8 } |
Functions | |
| should_inline void | get_ansi_color (char *buf, StandardColor fg, StandardColor bg) |
ANSI color codes.
| #define STD_COLOR_LIGHT 0x8 |
Definition at line 15 of file ansi_colors.h.
| #define ANSI_COLOR | ( | ... | ) |
ANSI color codes creator.
Usage:
Definition at line 48 of file ansi_colors.h.
Referenced by get_ansi_color().
| #define ANSI_COLOR_RESET "\033[0m" |
Definition at line 49 of file ansi_colors.h.
Referenced by sbi_console_set_color(), and SerialConsole::set_color().
| #define _ANSI_FG "3" |
Definition at line 53 of file ansi_colors.h.
| #define _ANSI_BG "4" |
Definition at line 54 of file ansi_colors.h.
| #define _ANSI_COLOR_black "0" |
Definition at line 56 of file ansi_colors.h.
| #define _ANSI_COLOR_red "1" |
Definition at line 57 of file ansi_colors.h.
| #define _ANSI_COLOR_green "2" |
Definition at line 58 of file ansi_colors.h.
| #define _ANSI_COLOR_yellow "3" |
Definition at line 59 of file ansi_colors.h.
| #define _ANSI_COLOR_blue "4" |
Definition at line 60 of file ansi_colors.h.
| #define _ANSI_COLOR_magenta "5" |
Definition at line 61 of file ansi_colors.h.
| #define _ANSI_COLOR_cyan "6" |
Definition at line 62 of file ansi_colors.h.
| #define _ANSI_COLOR_white "7" |
Definition at line 63 of file ansi_colors.h.
| #define _ANSI_STYLE_regular "0" |
Definition at line 65 of file ansi_colors.h.
| #define _ANSI_STYLE_bright "1" |
Definition at line 66 of file ansi_colors.h.
| #define _ANSI_STYLE_faint "2" |
Definition at line 67 of file ansi_colors.h.
| #define _ANSI_STYLE_italic "3" |
Definition at line 68 of file ansi_colors.h.
| #define _ANSI_STYLE_underline "4" |
Definition at line 69 of file ansi_colors.h.
| #define _ANSI_STYLE_blink "5" |
Definition at line 70 of file ansi_colors.h.
| #define _ANSI_STYLE_blink_fast "6" |
Definition at line 71 of file ansi_colors.h.
| #define _ANSI_STYLE_reverse "7" |
Definition at line 72 of file ansi_colors.h.
| #define _ANSI_STYLE_invisible "8" |
Definition at line 73 of file ansi_colors.h.
| #define _ANSI_COLOR_1 | ( | fg | ) |
Definition at line 75 of file ansi_colors.h.
| #define _ANSI_COLOR_2 | ( | fg, | |
| style ) |
Definition at line 76 of file ansi_colors.h.
| #define _ANSI_COLOR_3 | ( | fg, | |
| style, | |||
| bg ) |
Definition at line 77 of file ansi_colors.h.
| #define _ANSI_COLOR_N | ( | _1, | |
| _2, | |||
| _3, | |||
| N, | |||
| ... ) |
Definition at line 78 of file ansi_colors.h.
| enum StandardColor |
| Enumerator | |
|---|---|
| Black | |
| Blue | |
| Green | |
| Cyan | |
| Red | |
| Magenta | |
| Brown | |
| Gray | |
| DarkGray | |
| LightBlue | |
| LightGreen | |
| LightCyan | |
| LightRed | |
| LightMagenta | |
| Yellow | |
| White | |
Definition at line 17 of file ansi_colors.h.
| should_inline void get_ansi_color | ( | char * | buf, |
| StandardColor | fg, | ||
| StandardColor | bg ) |
Definition at line 80 of file ansi_colors.h.
Referenced by sbi_console_set_color(), and SerialConsole::set_color().