HomeJavaModsMatrixColorAPI
MatrixColorAPI
ModsJava

MatrixColorAPI

by ItsHarshXD · on Modrinth

Powerful Minecraft Color Parser Library. Supporting every version from 1.16.5 to 1.21+ on every server software!

⬇ Download on Modrinth
MatrixColorAPI — screenshot 1MatrixColorAPI — screenshot 2MatrixColorAPI — screenshot 3MatrixColorAPI — screenshot 4

🌈 MatrixColorAPI

MatrixColorAPI is a powerful and flexible library for processing and applying custom colors, gradients, and text decorations in Minecraft servers. It supports hex colors, legacy Minecraft color codes, and more advanced formatting like gradients and solid colors.

This library simplifies color management while allowing developers to build beautifully formatted text with ease!

Thumbnail

✨ Features

🚀 Getting Started

While MatrixColorAPI is designed to work with all Minecraft server software, it has currently been extensively tested only on Bukkit platforms. We encourage users on other platforms to try it out and report any issues they encounter. Your feedback is crucial in making MatrixColorAPI universally compatible!

Installation

API Version

MatrixColorAPI is hosted on Jitpack, making it easy to integrate with your Maven or Gradle projects. Follow the steps below to add it to your project:

Using Gradle

  1. Add the Jitpack repository to your build.gradle file (inside repositories block):

    repositories {
        maven { url 'https://jitpack.io' }
    }
    
  2. Add the dependency in your dependencies block:

    dependencies {
        implementation 'com.github.MatrixCreations:MatrixColorAPI:v1.0.7'
    }
    

Using Maven

  1. Add the Jitpack repository to your pom.xml:

     <repository>
         <id>jitpack.io</id>
         <url>https://jitpack.io</url>
     </repository>
    
  2. Add the dependency in your dependencies block:

    <dependency>
        <groupId>com.github.MatrixCreations</groupId>
        <artifactId>MatrixColorAPI</artifactId>
        <version>v1.0.7</version>
    </dependency>
    

Additional Information

Example Usages

Solid Color Example

String text = "<SOLID:#FFD700>This is yellow text";
String processed = MatrixColorAPI.process(text);

Gradient Color Example

String gradientText = "<GRADIENT:#FF0000>This is a red to yellow gradient</GRADIENT:#FFFF00>";
String processedGradient = MatrixColorAPI.process(gradientText);

Legacy Color Example

String legacyText = "&aThis is a green text with &lBOLD";
String processedLegacy = MatrixColorAPI.process(legacyText);

Hex Color Example

String hexText = "&#FFD700This is a yellow text with &lBOLD";
String processedLegacy = MatrixColorAPI.process(hexText);

🛠️ Available Methods

📦 Contributing

We welcome contributions! To get started:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. Submit a pull request with a clear explanation of your changes.

Make sure to follow the coding standards and include tests where appropriate.

📝 License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

📢 Acknowledgments

Thanks to everyone contributing to this project! Your support and feedback help make MatrixColorAPI even better.

👥 Contact

For any questions or feedback, feel free to open an issue or reach out to us on our discord server.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more