arc.color
fg()
¶
Foreground colors
Source code in arc/color.py
class fg:
"""Foreground colors"""
BLACK = Ansi(30)
RED = Ansi(31)
GREEN = Ansi(32)
YELLOW = Ansi(33)
BLUE = Ansi(34)
MAGENTA = Ansi(35)
CYAN = Ansi(36)
WHITE = Ansi(37)
GREY = Ansi(90)
BRIGHT_RED = Ansi(91)
BRIGHT_GREEN = Ansi(92)
BRIGHT_YELLOW = Ansi(93)
BRIGHT_BLUE = Ansi(94)
BRIGHT_MAGENTA = Ansi(95)
BRIGHT_CYAN = Ansi(96)
BRIGHT_WHITE = Ansi(97)
ARC_BLUE = Ansi('38;2;59;192;240')
@staticmethod
def rgb(red: int = 0, green: int = 0, blue: int = 0):
"""Returns the **foreground** ansi escape
sequence for the provided rgb values"""
return _rgb(38, red, green, blue)
@staticmethod
def hex(hex_code: Union[str, int]):
"""Returns the **foreground** ansi escape
sequence for the provided hex values"""
return _rgb(38, *_hex_to_rgb(hex_code))
bg()
¶
Background colors
Source code in arc/color.py
class bg:
"""Background colors"""
BLACK = Ansi(40)
RED = Ansi(41)
GREEN = Ansi(42)
YELLOW = Ansi(43)
BLUE = Ansi(44)
MAGENTA = Ansi(45)
CYAN = Ansi(46)
WHITE = Ansi(47)
GREY = Ansi(100)
BRIGHT_RED = Ansi(101)
BRIGHT_GREEN = Ansi(102)
BRIGHT_YELLOW = Ansi(103)
BRIGHT_BLUE = Ansi(104)
BRIGHT_MAGENTA = Ansi(105)
BRIGHT_CYAN = Ansi(106)
BRIGHT_WHITE = Ansi(107)
ARC_BLUE = Ansi('48;2;59;192;240')
@staticmethod
def rgb(red: int = 0, green: int = 0, blue: int = 0):
"""Returns the **background** ansi escape
sequence for the provided rgb values"""
return _rgb(48, red, green, blue)
@staticmethod
def hex(hex_code: Union[str, int]):
"""Returns the **"background"** ansi escape
sequence for the provided hex value"""
return _rgb(48, *_hex_to_rgb(hex_code))