Skip to main content

Colored Text

List of Color Codes

Color NameChat CodeMOTD CodeDecimalHexadecimal
dark_red§4\u00A7411141120#AA0000
red§c\u00A7c16733525#FF5555
gold§6\u00A7616755200#FFAA00
yellow§e\u00A7e16777045#FFFF55
dark_green§2\u00A7243520#00AA00
green§a\u00A7a5635925#55FF55
aqua§b\u00A7b5636095#55FFFF
dark_aqua§3\u00A7343690#00AAAA
dark_blue§1\u00A71170#0000AA
blue§9\u00A795592575#5555FF
light_purple§d\u00A7d16733695#FF55FF
dark_purple§5\u00A7511141290#AA00AA
white§f\u00A7f16777215#FFFFFF
gray§7\u00A7711184810#AAAAAA
dark_gray§8\u00A785592405#555555
black§0\u00A700#000000

HEX Colors in Config Files

You can use HEX colors in config files by using the #rrggbb format.

# Example
config_key: "#rrggbbThis is an example message."

Advanced Colored Text Support

We use ChatColorHandler by OakLoaf to handle colored text, including Hex colors and MiniMessage support.

Usage

Sending messages with ChatColorHandler is simple:

// Send to a player
ChatColorHandler.sendMessage(player, "&cThis is an example message");

// Broadcast to all players
ChatColorHandler.broadcastMessage("&aHello everyone!");

// Send action bar message
ChatColorHandler.sendActionBarMessage(player, "&bAction Bar Message");

You can also translate strings for GUI titles, item names, etc.:

String title = ChatColorHandler.translate("&#bbff33Inventory Title");

Advanced Usage (Parsers)

You can use parsers for PlaceholderAPI, MiniMessage, etc.

ChatColorHandler.translate("&#aaee99Example Message %server_name%", 
List.of(HexParser.INSTANCE, PlacecholderAPIParser.INSTANCE));

Hex Colors

Supported formats:

  • &#rrggbb
  • #rrggbb
ChatColorHandler.translate("&#aaee99Example Message");