Skip to main content

colorez

Simple addition of color to the builtin print and input functions

Installation

Simply run pip install colorez. The PyPI package is at https://pypi.org/project/colorez/

Example Usage

from colorez import color_print, Color, color_input, line_print, object_print, style, print_gradient

# color and styles added to builtin print
color_print("This is red", color="red")
color_print("This is gold and bold", color=178, bold=True)
color_print("This is pink with white background", color="#ed0ecc", bg_color="white")

# stylized text as objects for terminal output
print(Color("hi", 23, ["1", "2"], color="blue"), Color(0, 0, 255, color="plum"))
print("No color", Color(1, 2, 3, color="green"), "\t", Color("orange and italic", color="orange", italic=True))

# Choose style of the prompt for inputs
color_input("yellow and underlined>", color="yellow", underline=True)

# Rewrite lines with the same identifier
line_print("Starting")
line_print("Status: working", identifier="status", color="green")
line_print("Status: broken", identifier="status", color="red")

# Highlight types of objects
object_print({"foo": "bar"}, str_color="green", num_color="red")
object_print([1, 2, 3], str_color="green", num_color="red")

# Use style decorators to change all prints in a function
@style(color="green")
def my_function():
    print("this will be green")
    print("these green too", 2, [], {"foo": "bar"})
    color_print("this will be red", color="red")
my_function()

# Print with a gradient
print_gradient("This will print from red to blue", start_color="red", end_color="blue")

view_color_names()

test_terminal_color_set()

Metadata

Release files for colorez 1.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for colorez 1.1.4
File Size Uploaded Provenance Actions
colorez-1.1.4.tar.gz 14.2 kB Without provenance Details for colorez-1.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for colorez 1.1.4
File Interpreter ABI Platform Actions
colorez-1.1.4-py3-none-any.whl Python 3 none any Details for colorez-1.1.4-py3-none-any.whl

Total release size: 27.9 kB

Release files / colorez-1.1.4.tar.gz

Download URL colorez-1.1.4.tar.gz
Size 14.2 kB
Tags Source
SHA-256 checksum
How to use checksums
53ec1400f18758d6ab0c42e8c6c3ff2d7563472ecf7b511da8219ff983126f25
BLAKE2b-256 checksum
How to use checksums
38c9cfd67ca664af660beef7205058cfa43d35971a6330c2bb628225196370f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.11

Release files / colorez-1.1.4-py3-none-any.whl

Download URL colorez-1.1.4-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3de5200a9ec2f7de7b391de7a49d0a70a7884dca6be2f179c93323c9ac7fb643
BLAKE2b-256 checksum
How to use checksums
c9cdc4b61f38c2cd625afd7951c3b93165e64fc0e2146ef1d0cb272ae8ede794
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.11

Security for colorez 1.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page