Minecraft Color Codes
Minecraft colours text with a section sign (§) and one character: §0–§9 and §a–§f for the 16 colours, §k–§o for the five formatting styles and §r to reset. This lists every code with the exact hex value the game draws, copies any of them in a click, and previews your text as it will render.
motd=\u00A76\u00A7lMineSpecs SMP \u00A7r\u00A77- \u00A7aSurvival\u00A77, Java 26.2\n\u00A7eBuild, trade, \u00A7c\u00A7nexploreColours are the exact values the game draws for each code. A colour code switches bold, italic, underline, strikethrough and obfuscation off, so put formats after the colour. The motd line writes § as \u00A7, which server.properties reads correctly whatever the file’s encoding.
All 16 colour codes and 6 formatting codes
Every code is a section sign (§) followed by one character. The digits 0–9 and letters a–f pick one of 16 colours; k, l, m, n and o switch on a style; r resets everything. Letters are not case-sensitive, so §A and §a are the same code.
The & column is the same code in the form server plugins accept. The hex and RGB values are exactly what the game draws for each colour, and the colour names are the ones a text component's color field accepts in commands.
| § code | & code | Name | Hex | RGB |
|---|---|---|---|---|
| §0 | &0 | black | #000000 | 0, 0, 0 |
| §1 | &1 | dark_blue | #0000AA | 0, 0, 170 |
| §2 | &2 | dark_green | #00AA00 | 0, 170, 0 |
| §3 | &3 | dark_aqua | #00AAAA | 0, 170, 170 |
| §4 | &4 | dark_red | #AA0000 | 170, 0, 0 |
| §5 | &5 | dark_purple | #AA00AA | 170, 0, 170 |
| §6 | &6 | gold | #FFAA00 | 255, 170, 0 |
| §7 | &7 | gray | #AAAAAA | 170, 170, 170 |
| §8 | &8 | dark_gray | #555555 | 85, 85, 85 |
| §9 | &9 | blue | #5555FF | 85, 85, 255 |
| §a | &a | green | #55FF55 | 85, 255, 85 |
| §b | &b | aqua | #55FFFF | 85, 255, 255 |
| §c | &c | red | #FF5555 | 255, 85, 85 |
| §d | &d | light_purple | #FF55FF | 255, 85, 255 |
| §e | &e | yellow | #FFFF55 | 255, 255, 85 |
| §f | &f | white | #FFFFFF | 255, 255, 255 |
| §k | &k | obfuscated | — | — |
| §l | &l | bold | — | — |
| §m | &m | strikethrough | — | — |
| §n | &n | underline | — | — |
| §o | &o | italic | — | — |
| §r | &r | reset | — | — |
Why the order of codes matters
A colour code does more than change the colour: it also switches off bold, italic, underline, strikethrough and obfuscation. So §6§l gives bold gold text, while §l§6 gives plain gold, because the §6 cancels the bold that came before it.
To stack styles, give the colour first and every format after it, and use §r when you want to go back to the default style before the next colour.
§ versus &
The section sign is the only prefix the game itself reads. & is a convention from server plugins such as Essentials: they swap &6 for §6 before the text reaches the game, so & codes only work where a plugin does that translation.
Vanilla also treats § as a character you are not allowed to type in chat, so you can't colour chat messages by typing codes. On a vanilla server, coloured text comes from the MOTD and from commands.
Colour codes in a server MOTD
The motd line in server.properties accepts § codes. The server reads the file as UTF-8 and falls back to ISO-8859-1 if that fails, so a literal § works as long as the file is saved as UTF-8.
The escape \u00A7 is the safer choice: server.properties is a Java properties file, so \u escapes are decoded whatever encoding the file was saved in. The preview above builds that line for you.
motd=\u00A76\u00A7lMy Server\u00A7r \u00A77- survival
Colours in commands
Commands such as /tellraw and /title don't take § codes. They take a text component written in SNBT: set color to one of the 16 names above or to any hex value such as #FF5555, and switch styles on with bold, italic, underlined, strikethrough and obfuscated.
Hex colours are something text components can do that § codes can't: the codes stop at the 16 colours in the table.
/tellraw @a {text:"Server restarting",color:"gold",bold:true}
/title @a title {text:"Welcome",color:"#55FFFF"}Frequently asked questions
What is the § symbol in Minecraft?
It is the section sign (U+00A7), the prefix for every formatting code. The character after it picks the effect: §6 turns the text that follows gold and §l makes it bold.
How do I type the § symbol?
On Windows, hold Alt and type 0167 on the numeric keypad. On a Mac with a US keyboard, press Option+6. Or click any code above to copy it with the § already in place.
Why don't & colour codes work in vanilla Minecraft?
The game only reads §. & codes are a server-plugin convention: plugins such as Essentials replace & with § before the text reaches the game, so they only work where such a plugin is installed.
Can I use colour codes in chat?
Not in vanilla. The game refuses § as a typed chat character, so codes typed into chat do nothing. Servers that allow coloured chat do it with a plugin that translates & codes.
How do I add colour to my server's MOTD?
Put § codes in the motd line of server.properties. Either save the file as UTF-8 and use a literal §, or write each § as \u00A7, which works whatever the file's encoding.
Why does my text lose its bold when I change colour?
A colour code switches every format off. Put the colour first and the format after it: §6§l is bold gold, but §l§6 is plain gold.
What hex colour is Minecraft gold?
Gold (§6) is #FFAA00, or RGB 255, 170, 0. Every code's exact value is in the table above.
Can I use hex colours with § codes?
No. § codes stop at the 16 colours. Text components, which commands such as /tellraw and /title take, accept any colour as a hex value like #FF5555.
More tools
All toolsMap every slime chunk around spawn from any seed
Open toolExact odds for every enchantment, per slot, on any item
Open toolEvery enchantment a tool, weapon, or armor piece can hold
Open toolLink Overworld and Nether portals with the exact 8:1 coordinate math
Open toolSee the total XP to reach any level and what the next one costs
Open toolHow many mineral blocks each beacon tier needs, and its effect range
Open tool