Colors and text formats for console using python
- Import first:
import shell_colors as c
Usage Example:
- Option 1 f-string:
print(f"{c.red}Hello{c.end} {c.blue}World!{c.end}")
- Option 2 string format:
print("{}Hello{} {}World!{}".format(c.red, c.end, c.blue, c.end))
- Option 3 concat:
print(c.red + "Hello" + c.end + " " + c.blue + "World!" + c.end)
- Option... 4? 👀:
print(c.red , "Hello" , c.end , c.blue , "World!" , c.end)