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!
Metadata
Release files for altcolor 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| altcolor-0.0.5.tar.gz | 4.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| altcolor-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.9 kB
Release files / altcolor-0.0.5.tar.gz
| Download URL | altcolor-0.0.5.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bae287e594b43d20f7f63555fcdfbfd4eb45d58adcbba757d9f1586b5b074df9
|
|
BLAKE2b-256 checksum How to use checksums |
ee51ea6c119b16f0b4d1c6f138aabbf7bf013c1ede8a94566296b8a44f365501
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.13.0
|
Release files / altcolor-0.0.5-py3-none-any.whl
| Download URL | altcolor-0.0.5-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
11f60ffd3307359b05f336772beadf4cc3493c9c680ee0551c8fa46efc3249e7
|
|
BLAKE2b-256 checksum How to use checksums |
32f79909a52fc48a76e9ea803c8b9158c0c8c8cac03c1a1431496b141512a85d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.13.0
|