-
Notifications
You must be signed in to change notification settings - Fork 0
Advanced Features
SlamTheHam edited this page Jan 26, 2026
·
2 revisions
SimpleColor supports advanced color features beyond legacy codes.
Use any RGB color with the hex format:
&#RRGGBB
&#FF5500This is orange
�FF00This is lime green
&#FF1493This is deep pink
�CED1This is dark turquoise
Requires simplecolor.color.hex
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"
));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.
&#FF0000:00FF00Red to Green
&#red:yellow:greenTraffic Light colors
&#FF0000:FF7F00:FFFF00:00FF00:0000FF:8B00FFFull spectrum
&#dark_purple:light_purple:whitePurple fade
&#FF0000:0000FFGradient text &rNormal text &aGreen text
Requires simplecolor.color.gradient
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!"
));Built-in rainbow gradient shortcut:
&*text
Applies rainbow colors to all following text until another color code or reset.
&*This text is rainbow colored!
&*Rainbow text &rNormal text &*More rainbow
Requires simplecolor.color.rainbow
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!"));Create clickable text that opens URLs:
&(url)[display text]
&(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.
Requires simplecolor.link
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")
));