Crates.io | mccolors-rust |
lib.rs | mccolors-rust |
version | 0.1.3 |
source | src |
created_at | 2024-01-19 11:07:38.001492 |
updated_at | 2024-01-23 09:45:01.317622 |
description | A Rust library for working with Minecraft color codes and ANSI colors. |
homepage | https://github.com/wrrulos/mccolors-rust |
repository | https://github.com/wrrulos/mccolors-rust |
max_upload_size | |
id | 1105193 |
size | 7,735 |
mccolors-rust
is a Rust library for handling Minecraft-style color codes in your terminal text. Easily add colorful and expressive text to your Rust applications for a visually appealing user experience.
You can include mccolors-rust
in your Rust project by adding it to your Cargo.toml
:
[dependencies]
mccolors-rust = "0.1.3"
use mccolors_rust::{mcwrite, mcreplace, mcremove};
// Writing text with Minecraft color codes
mcwrite("&4Hello &rWorld!");
// Replacing Minecraft color codes with their respective colors
let formatted_text = mcreplace("&6Formatted &ctext &athat &3shines!");
// Removing Minecraft color codes from text
let clean_text = mcremove("&eClean &7this &ftext.");
mcwrite(text)
Allows writing text with Minecraft color codes in the terminal.
mcreplace(text)
Replaces Minecraft color codes in the text with their respective colors.
mcremove(text)
Removes Minecraft color codes from the text, leaving clean text.
text
: The input text containing Minecraft color codes.Contributions and suggestions are welcome! If you encounter any issues or want to contribute, please open an issue or pull request on GitHub.
This project is licensed under the MIT License - see the LICENSE file for details.