"""A bunch of color names mapped into RGB tuples and some methods for
setting the text color, background, etc... using ANSI escape
"""A bunch of color names mapped into RGB tuples and some methods for
setting the text color, background, etc... using ANSI escape
COLOR_NAMES_TO_RGB: Dict[str, Tuple[int, int, int]] = {
"abbey": (0x4C, 0x4F, 0x56),
COLOR_NAMES_TO_RGB: Dict[str, Tuple[int, int, int]] = {
"abbey": (0x4C, 0x4F, 0x56),
"electric lime": (0xCC, 0xFF, 0x00),
"electric violet": (0x8B, 0x00, 0xFF),
"elephant": (0x12, 0x34, 0x47),
"electric lime": (0xCC, 0xFF, 0x00),
"electric violet": (0x8B, 0x00, 0xFF),
"elephant": (0x12, 0x34, 0x47),
- "elf green": (0x08, 0x83, 0x70),
+ "elf green": (0x1B, 0x8A, 0x6B),
"elm": (0x1C, 0x7C, 0x7D),
"emerald": (0x50, 0xC8, 0x78),
"eminence": (0x6C, 0x30, 0x82),
"elm": (0x1C, 0x7C, 0x7D),
"emerald": (0x50, 0xC8, 0x78),
"eminence": (0x6C, 0x30, 0x82),
"scorpion": (0x69, 0x5F, 0x62),
"scotch mist": (0xFF, 0xFB, 0xDC),
"screamin' green": (0x66, 0xFF, 0x66),
"scorpion": (0x69, 0x5F, 0x62),
"scotch mist": (0xFF, 0xFB, 0xDC),
"screamin' green": (0x66, 0xFF, 0x66),
+ "screamin green": (0x66, 0xFF, 0x66),
+ "screaming green": (0x66, 0xFF, 0x66),
"sea buckthorn": (0xFB, 0xA1, 0x29),
"sea green": (0x2E, 0x8B, 0x57),
"sea mist": (0xC5, 0xDB, 0xCA),
"sea buckthorn": (0xFB, 0xA1, 0x29),
"sea green": (0x2E, 0x8B, 0x57),
"sea mist": (0xC5, 0xDB, 0xCA),
g = _pixel_to_216color(green)
b = _pixel_to_216color(blue)
code = 16 + r * 36 + g * 6 + b
g = _pixel_to_216color(green)
b = _pixel_to_216color(blue)
code = 16 + r * 36 + g * 6 + b
g = _pixel_to_216color(green)
b = _pixel_to_216color(blue)
code = 16 + r * 36 + g * 6 + b
g = _pixel_to_216color(green)
b = _pixel_to_216color(blue)
code = 16 + r * 36 + g * 6 + b
def fg_24bit(red: int, green: int, blue: int) -> str:
"""Set foreground using 24bit color mode"""
def fg_24bit(red: int, green: int, blue: int) -> str:
"""Set foreground using 24bit color mode"""
def bg_24bit(red: int, green: int, blue: int) -> str:
"""Set background using 24bit color mode"""
def bg_24bit(red: int, green: int, blue: int) -> str:
"""Set background using 24bit color mode"""
+ """Returns an ANSI escape sequence that resets text background
+ color to the default but preserves foreground coloring and text
+ attributes like bold, italics, underlines, etc...
+
+ """