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.
Metadata
Release files for mccolors 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mccolors-0.1.tar.gz | 3.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mccolors-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.7 kB
Release files / mccolors-0.1.tar.gz
| Download URL | mccolors-0.1.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2c0254be92e89b912344af0ee394b253984bc330f208ca0d8e43a9a7603b5a1
|
|
BLAKE2b-256 checksum How to use checksums |
2f3b7bae0cfef22889c958b6e65498ef449bfcc702bf05a44e9754196db386aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / mccolors-0.1-py3-none-any.whl
| Download URL | mccolors-0.1-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b20a585e9b60d2f4a8e0ffd6f53a8f01d91f6b3fb22e09c9513e730a04cef92
|
|
BLAKE2b-256 checksum How to use checksums |
afa47062269d9985fa87ee362245dc4184b36dcfd4f24e0b1f312b466a7daa3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|