Advanced color toolkit for Bukkit / Spigot / Paper plugins.
Gradients, rainbow effects, single RGB formats, MiniMessage-safe parsing, and legacy fallback in one place.
PrismaticAPI started as a fork of IridiumColorAPI, then evolved with a broader parser and a more complete formatting pipeline.
It helps you:
- Paint text with smooth gradients and rainbow effects.
- Parse multiple custom RGB syntaxes in a single pass.
- Keep compatibility with modern RGB and legacy 16-color clients.
- Convert output to plain strings or Adventure
TextComponent. - Strip any formatting quickly when you need clean text.
PrismaticAPI.colorize(...) processes text in this exact order:
- MiniMessage parsing (only if MiniMessage is available at runtime)
- Multi-color formats (
gradientandrainbow) - Single-color RGB formats
- Legacy ampersand translation (
&a,&l, etc.)
This order keeps complex tags stable and avoids conflicts between format types.
All custom Prismatic formats are case-insensitive and use 6-digit hex (RRGGBB).
| Format | Description |
|---|---|
<g:RRGGBB>text</g:RRGGBB> |
Short gradient tag |
<gradient:RRGGBB>text</gradient:RRGGBB> |
Long gradient tag |
<#RRGGBB>text</#RRGGBB> |
Hash-style gradient tag |
<#RRGGBB:#RRGGBB[:#RRGGBB...]>text</g> |
Multi-stop gradient with short close tag |
<#RRGGBB:#RRGGBB[:#RRGGBB...]>text</gradient> |
Multi-stop gradient with long close tag |
Gradient tags can include internal color stops:
<g:ff0000>Hello <g:00ff00>World</g:0000ff><gradient:ff0000>Hello <gradient:00ff00>World</gradient:0000ff><#ff0000>Hello <#00ff00>World</#0000ff>
| Format | Description |
|---|---|
<rainbow:NUMBER>text</rainbow> |
Full rainbow tag |
<r:NUMBER>text</r> |
Short rainbow tag |
NUMBER accepts 1 to 3 digits and is parsed as the saturation value.
| Format | Example |
|---|---|
{#RRGGBB} |
{#ff8800}Hello |
%#RRGGBB% |
%#ff8800%Hello |
[#RRGGBB] |
[#ff8800]Hello |
<#RRGGBB> |
<#ff8800>Hello |
&xRRGGBB |
&xff8800Hello |
#RRGGBB |
#ff8800Hello |
&#RRGGBB |
&#ff8800Hello |
Player player = Bukkit.getPlayer("a player reference");
String raw = "<g:ff0000>Hello <gradient:00ff00>world</gradient:0000ff> &l!";
String colored = PrismaticAPI.colorize(player, raw);
player.sendMessage(colored);TextComponent component = PrismaticAPI.colorizeAsComponent("<rainbow:1>PrismaticAPI</rainbow>");String raw = "�ff99Clean <his <rainbow:1>text</rainbow>";
String plain = PrismaticAPI.stripAll(raw);| Method | Purpose |
|---|---|
colorize(Player, String) |
Full pipeline with client legacy detection |
colorize(String) |
Full pipeline without player context |
colorizeAsComponent(...) |
Returns Adventure TextComponent |
applyGradient(...) |
Programmatic gradient application |
applyRainbow(...) |
Programmatic rainbow application |
stripBukkit(...) |
Removes &/Β§ legacy color markers |
stripSpecial(...) |
Removes formatting markers (k-o, r, etc.) |
stripRGB(...) |
Removes custom Prismatic RGB formats |
stripAll(...) |
Removes all known formatting |
Replace ${version} with your target release.
<repositories>
<repository>
<id>croabeast-repo</id>
<url>https://croabeast.github.io/repo/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>me.croabeast</groupId>
<artifactId>PrismaticAPI</artifactId>
<version>${version}</version>
<scope>compile</scope>
</dependency>
</dependencies>repositories {
maven {
url "https://croabeast.github.io/repo/"
}
}
dependencies {
implementation "me.croabeast:PrismaticAPI:${version}"
}- Java target:
1.8 - API base: Spigot
1.16.5(compile dependency) - Legacy fallback: enabled for old clients (and ViaVersion-aware when available)
- MiniMessage integration: optional at runtime
- Original inspiration: IridiumColorAPI
- Maintained and expanded by CroaBeast
This project is licensed under the GNU GPL v3.