All Minecraft color codes
Each code is the section sign § followed by one character. The HEX values are the text colors Java Edition uses.
| Code | Name | JSON name | HEX |
|---|---|---|---|
| §0 | Black | black | #000000 |
| §1 | Dark Blue | dark_blue | #0000AA |
| §2 | Dark Green | dark_green | #00AA00 |
| §3 | Dark Aqua | dark_aqua | #00AAAA |
| §4 | Dark Red | dark_red | #AA0000 |
| §5 | Dark Purple | dark_purple | #AA00AA |
| §6 | Gold | gold | #FFAA00 |
| §7 | Gray | gray | #AAAAAA |
| §8 | Dark Gray | dark_gray | #555555 |
| §9 | Blue | blue | #5555FF |
| §a | Green | green | #55FF55 |
| §b | Aqua | aqua | #55FFFF |
| §c | Red | red | #FF5555 |
| §d | Light Purple | light_purple | #FF55FF |
| §e | Yellow | yellow | #FFFF55 |
| §f | White | white | #FFFFFF |
The pattern is regular: dark colors use AA, bright ones use FF, and the bright versions add 55 to the other channels. The one exception is Gold, #FFAA00, which breaks the pattern of dark yellow.
Formatting codes
| Code | Effect |
|---|---|
| §k | Obfuscated: characters constantly scramble |
| §l | Bold |
| §m | Strikethrough (Java only) |
| §n | Underline (Java only) |
| §o | Italic |
| §r | Reset color and formatting |
In Java Edition, a color code clears any formatting before it. Put the color first and the formatting second: §6§lGold bold works, but §l§6Gold is not bold. The editor follows the same rule in its preview.
Bedrock extras
Bedrock Edition adds more colors: §g Minecoin Gold (#DDD605) and, in newer versions, "material" colors such as §h Quartz, §i Iron, §j Netherite, §m Redstone, §n Copper, §p Gold, §q Emerald, §s Diamond, §t Lapis and §u Amethyst. Because §m and §n are colors there, Bedrock has no strikethrough or underline. Switch the editor to Bedrock to show these colors and hide the Java-only formats.
§ or &?
The § sign can't be typed in Java Edition chat. Server plugins such as EssentialsX therefore accept & as a stand-in and translate &6 to §6 before sending the message. Use:
- & codes in plugin configs and chat on servers that support them,
- § codes in server.properties, books and signs made with commands, resource pack language files and data packs.
The Code prefix switch converts everything you've typed between the two styles.
Using the editor
Click a color or format button to insert its code at the cursor, then type. Select some text first and the button wraps it, adding a reset after it. The preview mimics the in-game look, including the darker drop shadow Java draws under text at a quarter of the text color's brightness.
Then choose an output:
- § codes, ready for books, signs and config files.
- & codes for plugins.
- MOTD: a
motd=line for server.properties, with\u00A7escapes and\nfor the second line. This avoids encoding problems, since the file isn't always read as UTF-8. - tellraw JSON: a
/tellraw @acommand with one text component per styled run, using color names or hex values.
Hex colors
Java Edition 1.16 and later accept any color in JSON text, for example {"text":"Hi","color":"#D9481C"}. Use the custom color input and Insert hex to add &#RRGGBB to your text:
- The tellraw output turns it into a proper hex color component.
- The § output writes the
§x§R§R§G§G§B§Bform used by Spigot, Paper and BungeeCord. Vanilla can't read it in plain text, so it needs a server that understands it. - The MOTD output swaps each hex color for the nearest of the 16 classic colors, which is all a vanilla MOTD shows.
Bedrock has no hex text colors, so hex insertion is disabled in Bedrock mode.
Related tools
To turn a code's HEX into RGB for a resource pack or image editor, use HEX to RGB. The gradient generator makes smooth hex steps for rainbow names. The random color generator helps when you need new ideas, and the color game tests how well you can read HEX by eye.
FAQ
How do I type § on a keyboard?
On Windows, hold Alt and type 0167 on the number pad. On a Mac, press Option + 6 (US layout). It's easier to copy it from the editor output.
Why does my server show "§6" as text instead of a color?
The file was probably saved in an encoding the server read differently, turning § into two characters. Use the MOTD output with \u00A7 escapes.
Can I color item names?
Yes, with commands that take JSON text components, or with an anvil on servers whose plugins allow color codes. In vanilla survival, anvils ignore codes.