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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file colorizelib-1.0.2.tar.gz.
File metadata
- Download URL: colorizelib-1.0.2.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a9c76236668552da19cd381a34d19243b85a2acb6d049d1b76721849f172982
|
|
| MD5 |
aee2b0b91953e84f59d1905655f96d3f
|
|
| BLAKE2b-256 |
a7562e07f2b5ad58da00e9e32cd2ba5a38b30a4f7b332671ef6f90e6eb7f6bf7
|
File details
Details for the file colorizelib-1.0.2-py3-none-any.whl.
File metadata
- Download URL: colorizelib-1.0.2-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c4406d9b40ff26775c01f5ec72b9b5ac91943828ef2982e8e8feec21efcc960
|
|
| MD5 |
0a5f1b670aaba861e50dc8a2e49bf121
|
|
| BLAKE2b-256 |
b594b54d472802bbbeae58abd8014c3cb62729b89e4c39085c56c2f261244665
|