🌈 Terminal string styling
Project description
clr is a simple terminal string styling library. Its API is a port of the popular chalk module for javascript.
Install
$ pip install clr
Usage
import clr
print(clr.red.bold('Hello world!'))
API
clr.style*[.style](*objects, sep=' ')
Chain styles and call the last one as a method with an argument. Order doesn’t matter, and later styles take precedence in case of a conflict, e.g. clr.red.yellow.green is equivalent to clr.green.
Multiple arguments will be separated by sep, a space by default.
Styles
Modifiers |
Colors |
Background colors |
||
---|---|---|---|---|
|
|
|
|
|
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.