k3color¶
This snippet will output colored text on a terminal:
from k3color import blue
from k3color import green
blue("blue") + " and " + green("green")

Working with prompt¶
To use colored string with terminal prompt, the terminal prompt is not wrapping correctly with very long commands. You need prompt=true to tell Str to fix these issues:
prompt = Str('colored prompt# ', color='red', prompt=True)
Those screenshots show this issue, the cursor is box.
prompt=False long command:

prompt=False long command after Home Key:

prompt=False long command after End Key:

prompt=True long command:

prompt=True long command after Home Key:

prompt=True long command after End Key:
