Created
June 19, 2023 05:30
-
-
Save SpikeVN/2706f2eb8170426dfcec1a1d48a0b65e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BLACK = "\N{ESC}[30m" | |
RED = "\N{ESC}[31m" | |
GREEN = "\N{ESC}[32m" | |
YELLOW = "\N{ESC}[33m" | |
GOLD = YELLOW | |
BLUE = "\N{ESC}[34m" | |
MAGENTA = "\N{ESC}[35m" | |
CYAN = "\N{ESC}[36m" | |
WHITE = "\N{ESC}[37m" | |
RESET = "\N{ESC}[0m" | |
BRIGHT_BLACK = "\N{ESC}[30;1m" | |
GRAY = BRIGHT_BLACK | |
BRIGHT_RED = "\N{ESC}[31;1m" | |
BRIGHT_GREEN = "\N{ESC}[32;1m" | |
BRIGHT_YELLOW = "\N{ESC}[33;1m" | |
BRIGHT_BLUE = "\N{ESC}[34;1m" | |
BRIGHT_MAGENTA = "\N{ESC}[35;1m" | |
BRIGHT_CYAN = "\N{ESC}[36;1m" | |
BRIGHT_WHITE = "\N{ESC}[37;1m" | |
BG_BLACK = "\N{ESC}[40m" | |
BG_RED = "\N{ESC}[41m" | |
BG_GREEN = "\N{ESC}[42m" | |
BG_YELLOW = "\N{ESC}[43m" | |
BG_BLUE = "\N{ESC}[44m" | |
BG_MAGENTA = "\N{ESC}[45m" | |
BG_CYAN = "\N{ESC}[46m" | |
BG_WHITE = "\N{ESC}[47m" | |
BG_BRIGHT_BLACK = "\N{ESC}[40;1m" | |
BG_BRIGHT_RED = "\N{ESC}[41;1m" | |
BG_BRIGHT_GREEN = "\N{ESC}[42;1m" | |
BG_BRIGHT_YELLOW = "\N{ESC}[43;1m" | |
BG_BRIGHT_BLUE = "\N{ESC}[44;1m" | |
BG_BRIGHT_MAGENTA = "\N{ESC}[45;1m" | |
BG_BRIGHT_CYAN = "\N{ESC}[46;1m" | |
BG_BRIGHT_WHITE = "\N{ESC}[47;1m" | |
BOLD = "\N{ESC}[1m" | |
UNDERLINE = "\N{ESC}[4m" | |
INVERT = "\N{ESC}[7m" | |
def up(n: int): | |
return "\N{ESC}[" + str(n) + "A" | |
def down(n: int): | |
return "\N{ESC}[" + str(n) + "B" | |
def left(n: int): | |
return "\N{ESC}[" + str(n) + "C" | |
def right(n: int): | |
return "\N{ESC}[" + str(n) + "D" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment