A library for adding colorful text output to terminal applications
Project description
SpectrumText
SpectrumText is a Python library for adding colorful text output to your terminal applications. It provides an easy-to-use interface for printing text in various colors and styles.
Features
- Print colored text using hex color codes or RGB values
- Support for background colors
- Rainbow text printing
- Multi-colored text printing
- Error handling for invalid color inputs
Installation
You can install SpectrumText using pip:
pip install spectrumtext
Usage
Here are some basic examples of how to use SpectrumText:
from spectrumtext import Printer
from colors import *
# Print colored text
Printer.print_colored("Hello, World!", "#FF0000") # Red text
Printer.print_colored("Hello, World!", colors.JADE_GREEN) # Green text
# Print with background color
Printer.print_colored("Background", (0, 255, 0), background=True) # Green background
# Print rainbow text
Printer.print_rainbow("Rainbow Text")
# Print multi-colored text
Printer.print_multi_colored(
"Example Multi Colored 1",
("Red", "#FF0000"),
("Green", "#00FF00"),
("Blue", "#0000FF")
)
Printer.print_multi_colored(
"Example Multi Colored 2",
("I am", colors.JADE_GREEN),
("From", colors.YELLOW),
("VietNam", colors.RED_ORANGE)
)
For more detailed usage instructions and examples, please refer to the documentation.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
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 spectrumtext-0.1.1.tar.gz.
File metadata
- Download URL: spectrumtext-0.1.1.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de9c2f729891c958e0a4149a43d5da5897700dd28e04cf5f604fc2de0d96954b
|
|
| MD5 |
5f7cf5ae9e7ecac7daf7847e3894d674
|
|
| BLAKE2b-256 |
46b7a302b4fcd50d68b4b96d325bd4240fb3572f470d2679bd11fcd69f997ec4
|
File details
Details for the file spectrumtext-0.1.1-py3-none-any.whl.
File metadata
- Download URL: spectrumtext-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b892fb0447bd7d28ff52fdb8dd9d6b7c38325c7b98cb4edd430639386efc04d
|
|
| MD5 |
6364044534271dd99e8b7e53fdc7c841
|
|
| BLAKE2b-256 |
9cdbeb11bc7f37f3b13f8643b69e4f13befcab0c565455e8a6668ad038f5b7a6
|