Skip to content

Advanced Features

SlamTheHam edited this page Jan 26, 2026 · 2 revisions

SimpleColor supports advanced color features beyond legacy codes.

Hex Colors

Use any RGB color with the hex format:

&#RRGGBB

Examples

&#FF5500This is orange
&#00FF00This is lime green
&#FF1493This is deep pink
&#00CED1This is dark turquoise

Permission

Requires simplecolor.color.hex

API Usage

import org.slamstudios.simplecolor.enums.ChatColor;

// hex() returns a code string "&#RRGGBB"
String orangeCode = ChatColor.hex("#FF5733");
String cyanCode = ChatColor.hex("00FFFF");  // # is optional

// Use with translate() to create a Message
player.sendMessage(ChatColor.translate(
    ChatColor.hex("#FF5733") + "Orange " + ChatColor.hex("#00FFFF") + "Cyan"
));

Gradients

Create smooth color transitions with multiple color stops:

&#color1:color2:color3:...

Colors can be hex codes (without #) or color names. The gradient applies to all following text until another color code or reset.

Examples

&#FF0000:00FF00Red to Green
&#red:yellow:greenTraffic Light colors
&#FF0000:FF7F00:FFFF00:00FF00:0000FF:8B00FFFull spectrum
&#dark_purple:light_purple:whitePurple fade

Gradient with Other Codes

&#FF0000:0000FFGradient text &rNormal text &aGreen text

Permission

Requires simplecolor.color.gradient

API Usage

import org.slamstudios.simplecolor.enums.ChatColor;

// gradient() returns a code string "&#hex1:hex2:..."
String twoColor = ChatColor.gradient("red", "blue");
String multiColor = ChatColor.gradient("#FF5733", "#FFC300", "#3498DB");

// Use with translate()
player.sendMessage(ChatColor.translate(
    ChatColor.gradient("red", "blue") + "Red to blue gradient!"
));

player.sendMessage(ChatColor.translate(
    ChatColor.gradient("red", "yellow", "green") + "Traffic light!"
));

Rainbow

Built-in rainbow gradient shortcut:

&*text

Applies rainbow colors to all following text until another color code or reset.

Examples

&*This text is rainbow colored!
&*Rainbow text &rNormal text &*More rainbow

Permission

Requires simplecolor.color.rainbow

API Usage

import org.slamstudios.simplecolor.enums.ChatColor;
import org.slamstudios.simplecolor.aliases.CC;

// RAINBOW is a constant string "&*"
String rainbowCode = ChatColor.RAINBOW;
String rainbowCode2 = CC.RAINBOW;

// Use with translate()
player.sendMessage(ChatColor.translate(ChatColor.RAINBOW + "Rainbow text!"));
player.sendMessage(CC.translate(CC.RAINBOW + "More rainbow!"));

Clickable Links

Create clickable text that opens URLs:

&(url)[display text]

Examples

&(https://example.com)[Click here to visit]
&(https://discord.gg/example)[Join our Discord!]
&(https://github.com)[&b&lGitHub]

Links can contain color codes in the display text.

Permission

Requires simplecolor.link

API Usage

import org.slamstudios.simplecolor.enums.ChatColor;
import org.slamstudios.simplecolor.aliases.CC;

// link() returns a code string "&(url)[text]"
String linkCode = ChatColor.link("https://example.com", "Click Here!");

// Use with translate()
player.sendMessage(ChatColor.translate(
    CC.GOLD + "Visit: " + ChatColor.link("https://example.com", "Our Website")
));

// Links with colored text
player.sendMessage(CC.translate(
    CC.link("https://discord.gg/example", "&b&lJoin Discord")
));

Clone this wiki locally