summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcolor.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/color.py b/color.py
new file mode 100755
index 0000000..594a370
--- /dev/null
+++ b/color.py
@@ -0,0 +1,7 @@
+#!/usr/bin/python3
+
+def color(num, text):
+ return f"\033[38;5;{num}m{text}\033[0m"
+
+for i in range(300):
+ print(color(i, f"number {i:02}"))