Minecraft Color Codes
Preview uses the Java Edition colors. §k obfuscated text animates, as in the game. Try §x§F§F§5§5§5§5 for a hex color (Java 1.16+).
The 16 colors — Java Edition
| Code | Color | Technical name | Foreground | RGB | Background | |
|---|---|---|---|---|---|---|
§0 | Black | black | #000000 | rgb(0, 0, 0) | #000000 | |
§1 | Dark Blue | dark_blue | #0000AA | rgb(0, 0, 170) | #00002A | |
§2 | Dark Green | dark_green | #00AA00 | rgb(0, 170, 0) | #002A00 | |
§3 | Dark Aqua | dark_aqua | #00AAAA | rgb(0, 170, 170) | #002A2A | |
§4 | Dark Red | dark_red | #AA0000 | rgb(170, 0, 0) | #2A0000 | |
§5 | Dark Purple | dark_purple | #AA00AA | rgb(170, 0, 170) | #2A002A | |
§6 | Gold | gold | #FFAA00 | rgb(255, 170, 0) | #3F2A00 | |
§7 | Gray | gray | #AAAAAA | rgb(170, 170, 170) | #2A2A2A | |
§8 | Dark Gray | dark_gray | #555555 | rgb(85, 85, 85) | #151515 | |
§9 | Blue | blue | #5555FF | rgb(85, 85, 255) | #15153F | |
§a | Green | green | #55FF55 | rgb(85, 255, 85) | #153F15 | |
§b | Aqua | aqua | #55FFFF | rgb(85, 255, 255) | #153F3F | |
§c | Red | red | #FF5555 | rgb(255, 85, 85) | #3F1515 | |
§d | Light Purple | light_purple | #FF55FF | rgb(255, 85, 255) | #3F153F | |
§e | Yellow | yellow | #FFFF55 | rgb(255, 255, 85) | #3F3F15 | |
§f | White | white | #FFFFFF | rgb(255, 255, 255) | #3F3F3F |
The 6 format codes
| Code | Effect | Technical name | What it does | Edition |
|---|---|---|---|---|
§k | Obfuscated | obfuscated | Cycles each character through random characters of the same width. | Both editions |
§l | Bold | bold | Thickens the text. | Both editions |
§m | Strikethrough | strikethrough | Draws a horizontal line through the text. | Java Edition only |
§n | Underline | underline | Underlines the text. | Java Edition only |
§o | Italic | italic | Slants the text. | Both editions |
§r | Reset | reset | Clears the color and every format that came before it. | Both editions |
Bedrock-only extra colors
Bedrock Edition adds material colors used in armor-trim tooltips and a party color. They do not exist in Java Edition — and note that §m and §n mean something different here than in Java.
| Code | Technical name | Foreground | |
|---|---|---|---|
§g | minecoin_gold | #EFCE16 | |
§h | material_quartz | #D9CCB8 | |
§i | material_iron | #A9B4B7 | |
§j | material_netherite | #8F727D | |
§m | material_redstone | #EE222C | |
§n | material_copper | #C87363 | |
§p | material_gold | #FFBF1E | |
§q | material_emerald | #13A045 | |
§s | material_diamond | #5FECFF | |
§t | material_lapis | #577BFF | |
§u | material_amethyst | #B66CDD | |
§v | material_resin | #FF6A00 | |
§w | party_blue | #8BB3FF |
Every Minecraft formatting code: the 16 Java Edition colors with hex, RGB, and background values, the 6 format codes, Bedrock differences, the 1.16+ hex form, and the MOTD \u00A7 form — plus a live preview.
A Minecraft color code is § followed by one character: §c is red (#FF5555), §6 is gold (#FFAA00), and §l makes text bold. Java 1.16+ also accepts any hex color as §x§R§R§G§G§B§B.
How formatting codes work
A formatting code is the section sign (§, U+00A7) followed by one character: a digit or letter for a color, or a letter for a format. Everything after the code takes that color or format until another code changes it. So §cHello §6World shows “Hello” in red and “World” in gold. The code itself is never displayed — the game reads it and hides it.
One rule catches almost everyone: a color code clears the formatting before it. §l§cHello is red but not bold, because §c comes after §l and resets it. Put the color first and the format second — §c§lHello — and the text is bold red. Use §r when you want to stop all formatting and go back to plain white text.
Java vs Bedrock: same codes, slightly different colors
The 16 codes are the same on both editions, but Bedrock renders several of them a little differently. The biggest gaps are gray and blue:
| Code | Color | Java Edition | Bedrock Edition |
|---|---|---|---|
§7 | gray | #AAAAAA | #C5C5C5 |
§8 | dark_gray | #555555 | #545454 |
§9 | blue | #5555FF | #447FFF |
§a | green | #55FF55 | #54FF54 |
§b | aqua | #55FFFF | #54FFFF |
§c | red | #FF5555 | #FF5454 |
§d | light_purple | #FF55FF | #FF54FF |
§e | yellow | #FFFF55 | #FFFF54 |
The background colors differ too, in the same direction: for example, gold (§6) has background #3F2A00 in Java but #402A00 in Bedrock. Beware of old tables that list the Java gold background as #2A2A00 — that value is wrong. The Java table on this page was checked against the Minecraft Wiki, which lists gold's background as RGB 63, 42, 0, which is #3F2A00.
Bedrock also lets you type § codes directly into most text fields — books, chat, signs, anvils — while Java only accepts them in text outside gameplay, such as server.properties, pack.mcmeta, splashes.txt, language files, world titles, and commands like /tellraw and /title. Typing § directly into Java chat disconnects you, even in single-player. And in Bedrock, §m and §n are not strikethrough and underline at all: they are the material colors for redstone and copper, so a Bedrock string that uses §m for strikethrough will come out red instead.
Any hex color (Java 1.16 and later)
Since the Nether Update (Java 1.16), you are no longer limited to the 16 colors. Any of the 16,777,216 hex colors works, written as §x followed by each hex digit prefixed with §: the color #FF5555 becomes §x§F§F§5§5§5§5. That is long to type by hand, which is why server software shortens it — Bukkit and Spigot plugins usually accept &#FF5555, and Paper's MiniMessage format writes it as <#FF5555>. In a /tellraw JSON component, you just write "color": "#FF5555". Hex colors are Java-only: Bedrock falls back to the nearest of the 16 classic colors.
The server MOTD and JSON text
The server list shows your server's name and message of the day (MOTD). Because server.properties is a plain text file, the § character is written there as a Unicode escape: motd=\u00A7cMy Server \u00A76\u00A7lSurvival. In JSON text — /tellraw, signs, books, and language files — the same escape works inside a JSON string: "text": "\u00A7dDiamond". The \u00A7 form and the literal § character mean exactly the same thing; the escape is just the safe way to write it in files that might not be saved as UTF-8.
Where the codes work
In Java Edition: server names and MOTDs, server.properties, resource-pack files (pack.mcmeta, splashes.txt, language files), world titles, item names renamed in an anvil (put §r§f first to remove the default italics), and /tellraw and /title commands. In Bedrock Edition: almost any text input, including chat, books, signs, and anvils. The codes are deprecated in the newest versions in favor of text components, but they still work — the modern system is covered on the Bukkit color codes page.
Not affiliated with or endorsed by Mojang or Microsoft. Minecraft is a trademark of Mojang Synergies AB. Color values on this page are the Java Edition render values published on the Minecraft Wiki.
Frequently asked questions
What is the Minecraft color code for gold?
Gold is §6, and its Java Edition foreground color is #FFAA00 (rgb(255, 170, 0)). Its background color is #3F2A00 — beware of old tables that list #2A2A00, which is wrong.
How do I type the § symbol?
On Windows, hold Alt and type 0167 on the number pad; on a Mac, press Option+6. On most keyboards it is easier to copy the § character from this page and paste it. Note that typing § directly into Java Edition chat disconnects you — use it in server files, resource packs, and commands instead.
Why did my bold text stop being bold when I changed color?
A color code clears any formatting that came before it. Write the color first and the format second — §c§l for bold red, not §l§c. Use §r to clear everything and start over.
Can I use any hex color in Minecraft?
Yes, in Java Edition 1.16 and later. Write it as §x followed by each hex digit prefixed with § — for example, #FF5555 becomes §x§F§F§5§5§5§5. In JSON text such as /tellraw, write "color": "#FF5555" directly. Bedrock Edition does not support hex colors and falls back to the nearest of the 16 classic colors.
Related tools
Bukkit Color Codes · Color Picker · Hex to RGB · Color Names · Gradient Generator