- Minecraft colours text with the § symbol plus a code: §c is red, §a is green, §l is bold.
- On Bedrock you can type them in chat, signs, books and anvil names.
- On Java you can't type § in chat. Use them in server MOTDs, commands like /tellraw, and resource packs.
Want a rainbow server name or a bold red warning sign? It's all done with colour codes. Here's every one, and where they actually work.
Colour codes
| Code | Colour | Code | Colour |
|---|---|---|---|
| §0 | Black | §8 | Dark grey |
| §1 | Dark blue | §9 | Blue |
| §2 | Dark green | §a | Green |
| §3 | Dark aqua | §b | Aqua |
| §4 | Dark red | §c | Red |
| §5 | Dark purple | §d | Light purple |
| §6 | Gold | §e | Yellow |
| §7 | Grey | §f | White |
Formatting codes
| Code | Effect | Works on |
|---|---|---|
| §l | Bold | Java and Bedrock |
| §o | Italic | Java and Bedrock |
| §k | Scrambled, glitchy text | Java and Bedrock |
| §n | Underline | Java only |
| §m | Strikethrough | Java only |
| §r | Reset back to normal | Java and Bedrock |
Colour first, then formatOn Java, a colour code turns off any formatting before it. Write §c§l (red, then bold), not §l§c, or you'll lose the bold.
Where you can use them
Bedrock
Almost anywhere you type: chat, signs, books and anvil renaming. Realm names and player names don't allow them.
Java
You can't type § in chat. It kicks you, even in single player. Use colour codes in:
- server.properties, for a coloured server MOTD
- /tellraw and /title commands in data packs
- Resource packs, like splash text and pack descriptions
Coloured signs on JavaRight-click a sign with any dye to colour its text, and use a
glow ink sac to make it glow. No codes needed.
Bedrock-only extra colours
Bedrock has extra colours named after materials, like §g (Minecoin gold), §s (diamond) and §q (emerald). On Bedrock, §m and §n are colours, not strikethrough and underline.
Cheat sheet
- §c red, §a green, §b aqua, §e yellow, §6 gold
- §l bold, §o italic, §r reset
- Colour first, then format
- Java chat: no § allowed

How Nether Portal Linking Works
Why Your Anvil Says Too Expensive
Shulker Box Storage Maths