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

CodeColorTechnical nameForegroundRGBBackground
§0Blackblack#000000rgb(0, 0, 0)#000000
§1Dark Bluedark_blue#0000AArgb(0, 0, 170)#00002A
§2Dark Greendark_green#00AA00rgb(0, 170, 0)#002A00
§3Dark Aquadark_aqua#00AAAArgb(0, 170, 170)#002A2A
§4Dark Reddark_red#AA0000rgb(170, 0, 0)#2A0000
§5Dark Purpledark_purple#AA00AArgb(170, 0, 170)#2A002A
§6Goldgold#FFAA00rgb(255, 170, 0)#3F2A00
§7Graygray#AAAAAArgb(170, 170, 170)#2A2A2A
§8Dark Graydark_gray#555555rgb(85, 85, 85)#151515
§9Blueblue#5555FFrgb(85, 85, 255)#15153F
§aGreengreen#55FF55rgb(85, 255, 85)#153F15
§bAquaaqua#55FFFFrgb(85, 255, 255)#153F3F
§cRedred#FF5555rgb(255, 85, 85)#3F1515
§dLight Purplelight_purple#FF55FFrgb(255, 85, 255)#3F153F
§eYellowyellow#FFFF55rgb(255, 255, 85)#3F3F15
§fWhitewhite#FFFFFFrgb(255, 255, 255)#3F3F3F

The 6 format codes

CodeEffectTechnical nameWhat it doesEdition
§kObfuscatedobfuscatedCycles each character through random characters of the same width.Both editions
§lBoldboldThickens the text.Both editions
§mStrikethroughstrikethroughDraws a horizontal line through the text.Java Edition only
§nUnderlineunderlineUnderlines the text.Java Edition only
§oItalicitalicSlants the text.Both editions
§rResetresetClears 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.

CodeTechnical nameForeground
§gminecoin_gold#EFCE16
§hmaterial_quartz#D9CCB8
§imaterial_iron#A9B4B7
§jmaterial_netherite#8F727D
§mmaterial_redstone#EE222C
§nmaterial_copper#C87363
§pmaterial_gold#FFBF1E
§qmaterial_emerald#13A045
§smaterial_diamond#5FECFF
§tmaterial_lapis#577BFF
§umaterial_amethyst#B66CDD
§vmaterial_resin#FF6A00
§wparty_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:

CodeColorJava EditionBedrock Edition
§7gray#AAAAAA#C5C5C5
§8dark_gray#555555#545454
§9blue#5555FF#447FFF
§agreen#55FF55#54FF54
§baqua#55FFFF#54FFFF
§cred#FF5555#FF5454
§dlight_purple#FF55FF#FF54FF
§eyellow#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