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
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
File details
Details for the file mccolors-0.1.tar.gz
.
File metadata
- Download URL: mccolors-0.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2c0254be92e89b912344af0ee394b253984bc330f208ca0d8e43a9a7603b5a1 |
|
MD5 | c62d05fb47d6f454b9ce1a7dc82e537e |
|
BLAKE2b-256 | 2f3b7bae0cfef22889c958b6e65498ef449bfcc702bf05a44e9754196db386aa |
File details
Details for the file mccolors-0.1-py3-none-any.whl
.
File metadata
- Download URL: mccolors-0.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b20a585e9b60d2f4a8e0ffd6f53a8f01d91f6b3fb22e09c9513e730a04cef92 |
|
MD5 | cc6c95fb6421b83cee9033bc5b9addf9 |
|
BLAKE2b-256 | afa47062269d9985fa87ee362245dc4184b36dcfd4f24e0b1f312b466a7daa3a |