A simple library to get colors in the bash terminal
Project description
Bash color
Available colors
- BLACK
- RED
- GREEN
- BROWN
- BLUE
- PURPLE
- CYAN
- LIGHT_GRAY
- DEFAULT
- DARK_GRAY
- LIGHT_RED
- LIGHT_GREEN
- YELLOW
- LIGHT_BLUE
- LIGHT_PURPLE
- LIGHT_CYAN
- WHITE
Available effect
- BOLD
- DIM (not working on Konsole)
- UNDERLINE
- BLINK (not working on Konsole and Gnome Terminal)
- INVERSE
- HIDDEN (not working on Konsole)
Example
from bashcolor import RED, UNDERLINE, colorize
print(colorize('Red color', RED))
print(colorize('Red background', background=RED))
print(colorize('Underline', effects=[UNDERLINE]))
API
def colorize(
text,
color=None,
background=None,
effects=[],
color_256=None,
background_256=None,
with_end=True):
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for bashcolor-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77f02f25dcf64bc6282985cf1f9c6b76019dbcfd2744dc02c86897b41350796b |
|
MD5 | 146f9ff540126f32920e8938f8a49f8e |
|
BLAKE2b-256 | 9200ebe438b30e933b1b8da0dfc4aecd9145c07ba7a7f53ecb63464de34a71f7 |