From 7d57ded5917bdd697eda3dff9fd8dd051a4c2678 Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Sat, 20 Jun 2020 17:11:49 +0200 Subject: [PATCH] 4 Bit Foreground Colors in bold --- terminalcolors.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/terminalcolors.py b/terminalcolors.py index c4ffeae..a572a02 100755 --- a/terminalcolors.py +++ b/terminalcolors.py @@ -2,10 +2,16 @@ default = "\033[0m" bar = " " def colors4(): - print("4 Bit colors:") + print("4 Bit background colors") seq_template = "\033[{};{}m{}" + bold_template= "\033[{};{};1m{} The quick brown fox jumps over the lazy dog" for color in range(40, 48): print(seq_template.format(30, color, color) + bar + default) + print("4 Bit foreground colors Bold") + seq_template += " The quick brown fox jumps over the lazy dog " + for color in range(30, 38): + print(seq_template.format(30, color, color) + bold_template.format(30, color, color) + default) + print() def colors8(): print("8 bit colors:")