Add missed ANSI codes for 4 bit colors

This commit is contained in:
Kirill A. Korinsky 2024-06-29 23:18:27 +01:00
parent 4572a7dc8a
commit 9dafaf0502
No known key found for this signature in database
GPG key ID: 98D8D9867759226E

View file

@ -488,6 +488,14 @@ CODE_BY_COLOR = {
"magenta": 35,
"cyan": 36,
"white": 37,
"bright_black": 90,
"bright_red": 91,
"bright_green": 92,
"bright_yellow": 93,
"bright_blue": 94,
"bright_magenta": 95,
"bright_cyan": 96,
"bright_white": 97,
# Background colors.
"bg_black": 40,
"bg_red": 41,
@ -497,6 +505,14 @@ CODE_BY_COLOR = {
"bg_magenta": 45,
"bg_cyan": 46,
"bg_white": 47,
"bg_bright_black": 100,
"bg_bright_red": 101,
"bg_bright_green": 102,
"bg_bright_yellow": 103,
"bg_bright_blue": 104,
"bg_bright_magenta": 105,
"bg_bright_cyan": 106,
"bg_bright_white": 107,
}
RESET_COLOR = f"{COLOR_ESCAPE}[39;49;00m"
# Precompile common ANSI-escape regex patterns