Skip to main content

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 spectrumtext.colors import *

# Print colored text
Printer.print_colored("Hello, World!", "#FF0000")  # Red text
Printer.print_colored("Hello, World!", 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", JADE_GREEN),
    ("From", YELLOW),
    ("VietNam", 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spectrumtext-0.1.2.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spectrumtext-0.1.2-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file spectrumtext-0.1.2.tar.gz.

File metadata

  • Download URL: spectrumtext-0.1.2.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for spectrumtext-0.1.2.tar.gz
Algorithm Hash digest
SHA256 dcf61bc6df82d82e43a60a9d0440c94710888a485f428a340719ab37181aa379
MD5 d1a8c2c49d5f2d4862597b4580f1a3b3
BLAKE2b-256 99fa6676d78154e3e22af095b224bdbfb58c925aa73d4114a408484038985e1a

See more details on using hashes here.

File details

Details for the file spectrumtext-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: spectrumtext-0.1.2-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

Hashes for spectrumtext-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 26cf3d49e2fed41b4ca262a3f97ff43c0c6447950b3b281bdb5e8182e49648a4
MD5 6a0284db35a42f86e2d6a1abee7441ca
BLAKE2b-256 c1508ce6fc19087a64069fc5042980c1ea76432bb519d6c62644daed6dd9a4c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page