colors
Color
¶
A class for terminal color codes.
Source code in m/color/colors.py
color(*args, auto_end=True)
¶
Color a message.
Format the arguments by replacing the colors in the Colors class. For instance::
color('{blue}Hello there{end}\n{yellow}WARNING')
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args |
str
|
Strings to color |
()
|
auto_end |
bool
|
Add a string to end coloring |
True
|
Returns:
Type | Description |
---|---|
str
|
A formatted message. |