From 7fd85c6b8e42c496904c5b914b5e3ad229231eab Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Sat, 20 Jun 2020 17:32:18 +0200 Subject: [PATCH] reference for 8 bit --- terminalcolors.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/terminalcolors.py b/terminalcolors.py index f9bc915..e74a70c 100755 --- a/terminalcolors.py +++ b/terminalcolors.py @@ -11,18 +11,16 @@ def colors4(): print def colors8(): - print("8 bit colors") + print("8 bit colors (\\033[48;5;m{})") seq_template = "\033[{};{};{}m{}" for color in range(16, 255): if color < 100: seq_template = "\033[{};{};{}m {} " else: seq_template = "\033[{};{};{}m {} " -# colorstring = "".join(seq_template.format(48, 5, i, i) for i in range(color, color + 36 )) print(seq_template.format(48, 5, color, color), end='') if color % 36 == 15: print() - #print(seq_template.format(48, 5, color) + bar + default) print() def main(): colors4()