A package designed to add color to text in console based applications. **[Credit to [colorama]('https://pypi.org/project/colorama/') for a few of the colors**
Project description
AltColor
AltColor is a Python package designed to add color to text in console-based applications, making it easy to create visually appealing outputs.
Predefined Colors
AltColor provides a variety of predefined colors for your text, some of which are credited to Colorama. These predefined colors include:
-
Standard Colors:
BLACK,RED,GREEN,YELLOW,BLUE,MAGENTA,CYAN,WHITE -
Light Colors:
LIGHTBLACK,LIGHTRED,LIGHTGREEN,LIGHTYELLOW,LIGHTBLUE,LIGHTMAGENTA,LIGHTCYAN,LIGHTWHITE
Additionally, you can define custom RGB colors for even more flexibility!
Installation
Install AltColor via pip:
pip install altcolor
Example Code
# Imports
# Imports
from altcolor import colored_text, leaked_text, reset, cPrint, init; init(show_credits=True)
# Code
# Colored text allows you to paint your words with RGB
print(colored_text((244, 5, 7), "Hello World!"))
# Here's a regular print
print("Hello World!")
# We even have predefined colors
print(colored_text("BLUE", "Hello World!"))
# Leaked text splills into other print statements until you use reset()
print(leaked_text("RED", "Hey,"))
print("you")
print("are" + reset())
# Leaked text can even spill into the background
print(leaked_text("WHITE", "cool!", "Back"))
print("How")
print("are")
print("you?" + reset())
# You can also use cPrint
cPrint(color="RED", text="Hello World!", objective="controlled")
print("Hello World!")
cPrint(color="RED", text="Hello World!", objective="leaked")
print("Hello World!" + reset())
print("Hello World!")
Key Features:
- Colored Text with RGB: Use custom RGB values to style your text.
- Predefined Colors: Quickly style text with easy-to-use predefined colors.
- Leaked Text: Color spills into subsequent output until explicitly reset.
- Background Color: Apply color to text backgrounds.
- Controlled Printing: Use
cPrintfor precise and formatted color control. - Credits Display: Show credits for the package. (optional using
init(show_credits=True))
Links
- PyPI: AltColor on PyPI
- GitHub: AltColor Repository
Happy coding, and bring your console to life with AltColor!
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
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 altcolor-0.0.5.tar.gz.
File metadata
- Download URL: altcolor-0.0.5.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bae287e594b43d20f7f63555fcdfbfd4eb45d58adcbba757d9f1586b5b074df9
|
|
| MD5 |
b6dabd45ab9b194aa61cce0c6f753634
|
|
| BLAKE2b-256 |
ee51ea6c119b16f0b4d1c6f138aabbf7bf013c1ede8a94566296b8a44f365501
|
File details
Details for the file altcolor-0.0.5-py3-none-any.whl.
File metadata
- Download URL: altcolor-0.0.5-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11f60ffd3307359b05f336772beadf4cc3493c9c680ee0551c8fa46efc3249e7
|
|
| MD5 |
13cf17fc8e04fd96a83eb4be58f2ed66
|
|
| BLAKE2b-256 |
32f79909a52fc48a76e9ea803c8b9158c0c8c8cac03c1a1431496b141512a85d
|