Bukkit Color Codes

Also converts &#RRGGBB and &x&R&R&G&G&B&B hex forms to the §x form. Try &#FF5555Hello.

The 16 colors — &, §, enum, MiniMessage, hex

& code§ codeColorBukkit enumMiniMessageJava render hex
&0§0BlackChatColor.BLACK<black>#000000
&1§1Dark BlueChatColor.DARK_BLUE<dark_blue>#0000AA
&2§2Dark GreenChatColor.DARK_GREEN<dark_green>#00AA00
&3§3Dark AquaChatColor.DARK_AQUA<dark_aqua>#00AAAA
&4§4Dark RedChatColor.DARK_RED<dark_red>#AA0000
&5§5Dark PurpleChatColor.DARK_PURPLE<dark_purple>#AA00AA
&6§6GoldChatColor.GOLD<gold>#FFAA00
&7§7GrayChatColor.GRAY<gray>#AAAAAA
&8§8Dark GrayChatColor.DARK_GRAY<dark_gray>#555555
&9§9BlueChatColor.BLUE<blue>#5555FF
&a§aGreenChatColor.GREEN<green>#55FF55
&b§bAquaChatColor.AQUA<aqua>#55FFFF
&c§cRedChatColor.RED<red>#FF5555
&d§dLight PurpleChatColor.LIGHT_PURPLE<light_purple>#FF55FF
&e§eYellowChatColor.YELLOW<yellow>#FFFF55
&f§fWhiteChatColor.WHITE<white>#FFFFFF

The 6 formats

& code§ codeEffectBukkit enumMiniMessage
&k§kObfuscatedChatColor.MAGIC<obfuscated> or <obf>
&l§lBoldChatColor.BOLD<bold> or <b>
&m§mStrikethroughChatColor.STRIKETHROUGH<strikethrough> or <st>
&n§nUnderlineChatColor.UNDERLINE<underlined> or <u>
&o§oItalicChatColor.ITALIC<italic> or <i>
&r§rResetChatColor.RESET<reset>

Bukkit, Spigot, Paper, and Purpur color codes for server owners and plugin developers: the & syntax, the ChatColor enum, translateAlternateColorCodes, 1.16+ hex forms, and MiniMessage — plus an & to § converter with live preview.

Bukkit plugins write & codes (&a for green, &6 for gold) and convert them with ChatColor.translateAlternateColorCodes('&', text). The ChatColor enum has 22 constants — 16 colors and 6 formats — and defines no hex values.

Why & instead of §?

The game itself only understands the section sign (§), but § is awkward to type and awkward to store: it is a non-ASCII character, it disconnects players who type it into Java chat, and many config files are not saved as UTF-8. So Bukkit plugins write & instead, and convert it at the last moment. That conversion is one method call:

import org.bukkit.ChatColor;

String colored = ChatColor.translateAlternateColorCodes('&', "&aWelcome &c&lPlayer!");
player.sendMessage(colored);

translateAlternateColorCodes takes the alternate character (almost always '&') and the text, and swaps every & that is followed by a valid code character (0–9, a–f, k–o, r) for the matching § code. An & followed by anything else is left alone, so &hello stays as typed and a doubled && survives as two ampersands. The same method powers EssentialsX, LuckPerms prefixes, scoreboards, and most plugin config files — if a config value starts with &, remember to put it in quotes in YAML, or the parser will read it as an anchor.

The enum, not the string

Behind the codes is a real Java enum, org.bukkit.ChatColor, with 22 constants: the 16 colors and the 6 formats, in the same order as the vanilla codes. The enum is what your plugin code should use instead of raw strings, because a typo in ChatColor.DARK_PURPULE fails at compile time, while a typo in "&5" fails silently at runtime. Useful companions: ChatColor.stripColor(text) removes every code (handy for logging), ChatColor.getLastColors(text) returns the color and formats active at the end of a string (handy when a message wraps onto a second line), ChatColor.getByChar('c') looks a code up by its character, and isColor() / isFormat() tell the two kinds apart. The prefix character itself is the constant ChatColor.COLOR_CHAR, which is § (U+00A7).

One thing the enum does not contain: hex values. Bukkit defines no RGB color at all — the hex column in the table above is the color the Java client renders for that code, identical to the Minecraft color codes table. If you need a hex value in a Bukkit plugin, it comes from elsewhere: BungeeCord's net.md_5.bungee.api.ChatColor.of("#FF5555"), or Paper's Adventure API.

Hex colors: 1.16 and later

Since Minecraft 1.16, any of the 16,777,216 hex colors works in chat text. Three spellings circulate, and they all mean the same color:

FormExample (red #FF5555)Used by
&#RRGGBB&#FF5555ShopEssentialsX, CMI, TAB, and most plugin configs
&x&R&R&G&G&B&B&x&F&F&5&5&5&5ShopPlugins that translate & to § (the & spelling of the vanilla form)
§x§R§R§G§G§B§B§x§F§F§5§5§5§5ShopHow Spigot and Paper store hex inside legacy text
MiniMessage <#RRGGBB><#FF5555>ShopPaper, Velocity, and Adventure-based plugins

The converter above turns the first two forms into the third, so you can paste a config line and see exactly what the server sends. Players on versions before 1.16 cannot see hex colors at all, so keep the 16 classic codes as a fallback if your server still supports old clients.

MiniMessage: the modern replacement

Paper, Velocity, and Purpur all ship the Adventure library, whose MiniMessage format replaces codes with readable tags: <green><bold>Welcome</bold></green> instead of &a&lWelcome. Every color in the table above has a tag with the same name as the vanilla technical name — <dark_blue>, <light_purple>, <gold> — and the formats are <bold> (or <b>), <italic> (<i>), <underlined> (<u>), <strikethrough> (<st>), <obfuscated> (<obf>), and <reset>. MiniMessage can do things codes cannot: <gradient:#FF0000:#0000FF>Rainbow text</gradient> fades across the text, <rainbow> cycles the hue, and <hover:show_text:'...'> and <click:run_command:'...'> add tooltips and clickable actions. On Paper, parse it with MiniMessage.miniMessage().deserialize("<green>Hello</green>"); the legacy equivalent on Paper is LegacyComponentSerializer.legacy('&').deserialize(message), which is the component-aware replacement for translateAlternateColorCodes.

Which servers does this cover?

The same 22 codes work on Bukkit, Spigot, Paper, and Purpur, because they all share the Bukkit API — a plugin written against Bukkit runs on all four. BungeeCord and Velocity proxies use the same legacy codes in their own configs, but their API is different: BungeeCord has its own net.md_5.bungee.api.ChatColor (which does have hex support through ChatColor.of), and Velocity is MiniMessage-first. If you are starting a new plugin on Paper 1.21 or later, write MiniMessage and keep & codes only for old config files — that is the direction the platform is moving, and it is the only way to get gradients, hover text, and true RGB without a converter in the middle.

Not affiliated with or endorsed by Mojang, Microsoft, SpigotMC, or PaperMC. Bukkit, Spigot, Paper, and Purpur are trademarks of their respective owners. Hex values are the Java client render values, identical to the Minecraft table — the Bukkit API itself defines no hex colors.

Frequently asked questions

How do I use & color codes in a Bukkit plugin?

Call ChatColor.translateAlternateColorCodes('&', message) and send the result. It swaps every & followed by a valid code character (0-9, a-f, k-o, r) for the matching § code. An & followed by anything else is left alone.

What is the Bukkit code for gold?

Gold is &6 in configs, §6 in the game, ChatColor.GOLD in Java code, and <gold> in MiniMessage. Its Java client render color is #FFAA00.

Does Bukkit support hex colors like #FF5555?

The Bukkit ChatColor enum itself does not — it has only the 16 classic colors. Hex colors work through the server software: write &#FF5555 in most plugin configs, or use MiniMessage <#FF5555> on Paper, or BungeeCord's ChatColor.of("#FF5555"). Hex needs Minecraft 1.16 or later.

Should I use & codes or MiniMessage on a new Paper server?

MiniMessage, for anything new. Tags like <green><bold>Welcome</bold></green> are readable, support gradients, hover text, and click actions, and are Paper's native format. Keep & codes only for older config files and plugins that still expect them.

Related tools

Minecraft Color Codes · Color Picker · Hex to RGB · Gradient Generator · Color Names