Torch & Anvil

Chapter II
Building and design

Minecraft Color Code Generator

Editions: Java + Bedrock (differences in FAQ) · Verified: Java 26.3 / Bedrock 26.50 · 2026-09-16 · Updated 2026-09-16

Type your text, pick a color and formats, and get all three output forms at once: the legacy § string for chat and signs, the §-escaped line for a server MOTD, and the JSON text component vanilla Java uses in commands. A gradient builder handles per-character hex fades.

Preview:

Chat / sign:

server.properties MOTD:

JSON text component:

Hex gradient builder

Preview:

JSON (Java 1.16+):

#CharHex

The verified code table

CodeNameHexCodeNameHex
§0black#000000§8dark_gray#555555
§1dark_blue#0000AA§9blue#5555FF
§2dark_green#00AA00§agreen#55FF55
§3dark_aqua#00AAAA§baqua#55FFFF
§4dark_red#AA0000§cred#FF5555
§5dark_purple#AA00AA§dlight_purple#FF55FF
§6gold#FFAA00§eyellow#FFFF55
§7gray#AAAAAA§fwhite#FFFFFF

Format codes: §l bold, §m strikethrough (Java), §n underline (Java), §o italic, §k obfuscated, §r reset. Table verified against the Minecraft Wiki's formatting-codes documentation (minecraft.wiki/w/Formatting_codes); the color codes guide names the sources and covers the Bedrock extras.

Questions builders actually ask

Do hex colors work in vanilla Minecraft?

In Java Edition, JSON text components have accepted any #RRGGBB hex color since 1.16 — that is what the JSON and gradient outputs here produce, and vanilla renders them in tellraw, titles, books, and signs. The legacy § codes only ever cover the 16 named colors. Server software layers its own hex formats on top of that, which vary by plugin.

Why do my codes break in server.properties?

server.properties is a Java properties file, and a raw § pasted into it does not survive reliably. Write each section sign as the escape \u00A7 instead — the MOTD output on this page does that conversion for you.

Are the format codes the same on Bedrock?

Bold, italic, and obfuscated match. Strikethrough (§m) and underline (§n) are Java-only: Bedrock reuses those two codes as material colors (redstone and copper). Bedrock also adds extra colors Java lacks, such as §g minecoin gold.

How does the gradient output work?

The gradient builder emits one JSON component per character, interpolating each RGB channel linearly from the start color to the end color. Spaces carry no color code. The resulting array is plain vanilla Java JSON — paste it into a tellraw command or a written book.