How Minecraft color codes work
A Minecraft color code is the section sign (§) followed by one character. Everything after the code takes that color or style until another
code changes it. §aHello shows the word in green, and §c§lWarning shows it in bold red.
Java Edition has 16 color codes (0 to 9 and a to f) and six formatting codes. Bedrock
Edition has the same 16 colors, draws several of them with slightly different hex values, and adds 13 more: minecoin gold, eleven material
colors that the game uses in armor trim tooltips, and party blue. Switch the table to Bedrock Edition to see them. The Bedrock values are as
of October 2026: Bedrock Edition 26.50, released in September 2026, changed blue and the material colors.
Put the color first, then the formatting
In Java Edition a color code switches off any formatting that came before it, so §l§cText is red but not bold. Write the color
first: §c§lText. Bedrock Edition keeps the formatting when the color changes. In both editions §r clears the color
and the formatting together.
Where you can use the codes
Java Edition
Java Edition does not accept § in the chat box or in commands such as /say, and you can no longer type or paste it into a book.
The codes work in text the game reads from files:
- the
motdline inserver.properties - resource pack files:
pack.mcmeta,splashes.txtand language files - world titles
/tellrawand/titlecommands inside a data pack
In commands you type yourself, set the color with a
text component instead. Its color field takes the technical name shown under
each color in the table, such as gold, or a hex value such as #FF8800. For chat, signs and nicknames on a Java
server, you need a plugin that accepts & codes.
Bedrock Edition
Bedrock Edition accepts § in almost any text box. You can paste codes into chat, signs, a book and quill, and the anvil when you rename an item. Realm names and player names do not accept them, and some menu screens do not draw the colors, so a colored world name can show up plain.
How to type the section sign
Copying a code from the table is the quickest way on any device. To type § yourself:
| Device | Keys |
|---|---|
| Windows | Hold Alt and type 21 on the number pad. Alt + 0167 often works too. |
| Mac | Option + 6 on a US keyboard, Option + 5 on US Extended. |
| Linux | Compose, then s, then o, if you have a compose key set up. |
| iPhone and iPad | Press and hold the & key on an iPhone, or the % key on an iPad. |
| Android | Gboard: on the extra symbols page. Samsung Keyboard: press and hold the s key. |
Why & codes only work with a plugin
Minecraft itself only understands the section sign. The ampersand form is a convention from server plugins: you write &a,
and the plugin swaps it for §a before the text is shown. The Bukkit API that Spigot and Paper plugins are built on has a
function for exactly this. It replaces an ampersand only
when the next character is 0 to 9, a to f, k to o or r.
So & codes work in a plugin's config file, and in chat when a chat plugin translates them and you have permission. With
EssentialsX and its Chat add-on, for example, players need
essentials.chat.color to use colors in chat. In server.properties, in vanilla chat or on a server with no plugins,
nothing translates the ampersand, and players see &a as plain text. Wherever a place needs §, paste your text into the
converter above.
Use color codes in your server MOTD
The MOTD is the message under your server's name in the multiplayer list. Open server.properties in your control panel's file
manager, find the line that starts with motd= and put § codes in it:
motd=§6§lSurvival §r§7| §aOpen to everyone
Save the file and restart the server. Since Java Edition 1.20 the server reads this file as UTF-8, so save it in that encoding. If the colors
come out as stray symbols, write \u00A7 in place of each §, which works whatever the encoding. Keep the MOTD to 59 characters or
fewer, or the server list may show a communication error. The
MOTD generator builds this line for you, and the
server.properties generator writes the rest of the file.
Common mistakes
- An ampersand that gets eaten. A plugin that translates & codes reads
R&Das the letter R followed by the code for light purple. Put a space after an ampersand you want to keep. - Bedrock codes on a Java server.
§gto§j,§p,§qand§sto§ware not codes in Java Edition, and§mand§nmean strikethrough and underline there, not redstone and copper. - No reset at the end. A code keeps working until another one replaces it. End a colored name or prefix with
§rso the text after it goes back to normal. - Expecting hex colors. The § codes are a fixed palette. For any other color use a text component, or a plugin with its own
syntax: EssentialsX accepts
&#RRGGBBfrom version 2.18.0.
Sources
The data and rules in this tool were last checked on against:
- Minecraft Wiki: Formatting codes
- Minecraft Wiki: Bedrock Edition 26.50 (color changes)
- Minecraft Wiki: server.properties
- Minecraft Wiki: Text component format
- Spigot API documentation: ChatColor (how plugins translate & codes)
- EssentialsX Wiki: Color permissions
- Java SE 21 API: java.util.Properties (Unicode escapes)