Skip to main content

A Python package for managing Minecraft-style colors in terminal output.

Project description

MCColors

MCColors is a Python module that allows you to handle Minecraft-style color codes in your terminal text output.

Installation

You can install MCColors using pip:

pip install mccolors

Usage

from mccolors import mcwrite, mcreplace, mcremove

# Writing text with Minecraft color codes
mcwrite('&4Hello &rWorld!', reset_all=True)

# Replacing Minecraft color codes with their respective colors
formatted_text = mcreplace('&6Formatted &ctext &athat &3shines!')

# Removing Minecraft color codes from text
clean_text = mcremove('&eClean &7this &ftext.')

Functions

mcwrite(text, reset_all=True)

Allows writing text with Minecraft color codes in the terminal.

mcreplace(text, reset_all=True)

Replaces Minecraft color codes in the text with their respective colors.

mcremove(text)

Removes Minecraft color codes from the text, leaving clean text.

Parameters

  • text: The input text containing Minecraft color codes.
  • reset_all: A boolean value that decides whether to reset the text color at the end (default: True).

Contributions and Issues

Contributions and suggestions are welcome! If you encounter any issues or want to contribute, please open an issue or pull request on GitHub.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

mccolors-0.1.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

mccolors-0.1-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

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