A simple library to colorize your terminal
Project description
Colorize.py
What is it and what is it for
Colorize.py is a very simple to use and understand python library. It allows you to color text in the terminal. This library is inspired by the pycolor library
instalation
pip install colorizelib
Functions
Function | Description |
---|---|
colorize(text, foreground, style, background) |
Colorize the text with the foreground, style and background |
colorize_foreground(text, foreground) |
Colorize the text with the foreground |
colorize_style(text, style) |
Colorize the text with the style |
colorize_background(text, background) |
Colorize the text with the background |
colorize_rainbow(text, mode_type) |
Colorize the text with a rainbow |
get_color_list() |
Get the list of all colors |
get_color_name(color) |
Get the name of the color by number |
get_color_number(color) |
Get the number of the color by name |
Exemples
from colorize import colorize
print(colorize.colorize("Hello World", foreground="red", style="bold", background="blue"))
from colorize import colorize
print(colorize.colorize("Hello World", foreground="blue"))
from colorize import colorize
print(colorize.colorize_style("Hello World", "bold"))
from colorize import colorize
print(colorize.colorize_rainbow("Hello World", "foreground"))
Contributors
How to Contributing
Open pull request 😎
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.
Source Distribution
colorizelib-1.0.2.tar.gz
(5.5 kB
view hashes)
Built Distribution
Close
Hashes for colorizelib-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c4406d9b40ff26775c01f5ec72b9b5ac91943828ef2982e8e8feec21efcc960 |
|
MD5 | 0a5f1b670aaba861e50dc8a2e49bf121 |
|
BLAKE2b-256 | b594b54d472802bbbeae58abd8014c3cb62729b89e4c39085c56c2f261244665 |