# Special
RESET = "\033[0m"

# Styles
BOLD = "\033[1m"
DIM = "\033[2m"
ITALIC = "\033[3m"
UNDERLINE = "\033[4m"
BLINK = "\033[5m"
INVERSE = "\033[7m"
NORMAL = "\033[22m"

# Foreground
FORE_BLACK = "\033[30m"
FORE_RED = "\033[31m"
FORE_GREEN = "\033[32m"
FORE_YELLOW = "\033[33m"
FORE_BLUE = "\033[34m"
FORE_MAGENTA = "\033[35m"
FORE_CYAN = "\033[36m"
FORE_WHITE = "\033[37m"
FORE_RESET = "\033[39m"
FORE_BRIGHT_BLACK = "\033[1;30m"
FORE_BRIGHT_RED = "\033[1;31m"
FORE_BRIGHT_GREEN = "\033[1;32m"
FORE_BRIGHT_YELLOW = "\033[1;33m"
FORE_BRIGHT_BLUE = "\033[1;34m"
FORE_BRIGHT_MAGENTA = "\033[1;35m"
FORE_BRIGHT_CYAN = "\033[1;36m"
FORE_BRIGHT_WHITE = "\033[1;37m"

# Background
BACK_BLACK = "\033[40m"
BACK_RED = "\033[41m"
BACK_GREEN = "\033[42m"
BACK_YELLOW = "\033[43m"
BACK_BLUE = "\033[44m"
BACK_MAGENTA = "\033[45m"
BACK_CYAN = "\033[46m"
BACK_WHITE = "\033[47m"
BACK_RESET = "\033[49m"
BACK_LIGHT_BLACK = "\033[100m"
BACK_LIGHT_RED = "\033[101m"
BACK_LIGHT_GREEN = "\033[102m"
BACK_LIGHT_YELLOW = "\033[103m"
BACK_LIGHT_BLUE = "\033[104m"
BACK_LIGHT_MAGENTA = "\033[105m"
BACK_LIGHT_CYAN = "\033[106m"
BACK_LIGHT_WHITE = "\033[107m"

# Do not use
BACK_BRIGHT_BLACK = "\033[100m"
BACK_BRIGHT_RED = "\033[101m"
BACK_BRIGHT_GREEN = "\033[102m"
BACK_BRIGHT_YELLOW = "\033[103m"
BACK_BRIGHT_BLUE = "\033[104m"
BACK_BRIGHT_MAGENTA = "\033[105m"
BACK_BRIGHT_CYAN = "\033[106m"
BACK_BRIGHT_WHITE = "\033[107m"

# 24-bit colours
def fore( r, g, b ):
    return "\033[38;2;" + str( r ) + ";" + str( g ) + ";" + str( b ) + "m"

def back( r, g, b ):
    return "\033[48;2;" + str( r ) + ";" + str( g ) + ";" + str( b ) + "m"

# Text
FR = FORE_RED
FG = FORE_GREEN
FB = FORE_BLUE
FC = FORE_CYAN
FY = FORE_YELLOW
FM = FORE_MAGENTA
FW = FORE_WHITE
FK = FORE_BLACK

FBR = FORE_BRIGHT_RED
FBG = FORE_BRIGHT_GREEN
FBB = FORE_BRIGHT_BLUE
FBC = FORE_BRIGHT_CYAN
FBY = FORE_BRIGHT_YELLOW
FBM = FORE_BRIGHT_MAGENTA
FBW = FORE_BRIGHT_WHITE
FBK = FORE_BRIGHT_BLACK

#Background
BR = BACK_RED
BG = BACK_GREEN
BB = BACK_BLUE
BC = BACK_CYAN
BY = BACK_YELLOW
BM = BACK_MAGENTA
BW = BACK_WHITE
BK = BACK_BLACK

BBR = BACK_LIGHT_RED
BBG = BACK_LIGHT_GREEN
BBB = BACK_LIGHT_BLUE
BBC = BACK_LIGHT_CYAN
BBY = BACK_LIGHT_YELLOW
BBM = BACK_LIGHT_MAGENTA
BBW = BACK_LIGHT_WHITE
BBK = BACK_LIGHT_BLACK

# Styles
SB = BOLD
SD = DIM
SI = ITALIC
SU = UNDERLINE
SE = INVERSE
