Skip to main content

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:

  1. Colored Text with RGB: Use custom RGB values to style your text.
  2. Predefined Colors: Quickly style text with easy-to-use predefined colors.
  3. Leaked Text: Color spills into subsequent output until explicitly reset.
  4. Background Color: Apply color to text backgrounds.
  5. Controlled Printing: Use cPrint for precise and formatted color control.
  6. Credits Display: Show credits for the package. (optional using init(show_credits=True))

Links


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)

Source distribution for altcolor 0.0.5
File Size Uploaded
altcolor-0.0.5.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for altcolor 0.0.5
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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