Skip to main content

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"))

result

from colorize import colorize

print(colorize.colorize("Hello World", foreground="blue"))

result

from colorize import colorize

print(colorize.colorize_style("Hello World", "bold"))

result

from colorize import colorize

print(colorize.colorize_rainbow("Hello World", "foreground"))

result

Contributors

How to Contributing

Open pull request 😎

Project details


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)

Uploaded Source

Built Distribution

colorizelib-1.0.2-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page