Skip to content

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))

hex(hex_code) staticmethod

Returns the foreground ansi escape sequence for the provided hex values

Source code in arc/color.py
@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))

rgb(red=0, green=0, blue=0) staticmethod

Returns the foreground ansi escape sequence for the provided rgb values

Source code in arc/color.py
@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)

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))

hex(hex_code) staticmethod

Returns the "background" ansi escape sequence for the provided hex value

Source code in arc/color.py
@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))

rgb(red=0, green=0, blue=0) staticmethod

Returns the background ansi escape sequence for the provided rgb values

Source code in arc/color.py
@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)

effects()

Other effects

Source code in arc/color.py
class effects:
    """Other effects"""
    CLEAR         = Ansi(0)
    BOLD          = Ansi(1)
    ITALIC        = Ansi(3)
    UNDERLINE     = Ansi(4)
    STRIKETHROUGH = Ansi(9)