Skip to content
IPalettes
Color library

Minecraft color codes

Sixteen colour codes, six formatting codes, and the material colours only Bedrock understands. Hex and RGB for every one, with § and & ready to copy.

Java & Bedrock · §0 – §f · 16 colors

§0
Blackrgb(0, 0, 0)
§1
Dark Bluergb(0, 0, 170)
§2
Dark Greenrgb(0, 170, 0)
§3
Dark Aquargb(0, 170, 170)
§4
Dark Redrgb(170, 0, 0)
§5
Dark Purplergb(170, 0, 170)
§6
Goldrgb(255, 170, 0)
§7
Grayrgb(170, 170, 170)
§8
Dark Grayrgb(85, 85, 85)
§9
Bluergb(85, 85, 255)
§a
Greenrgb(85, 255, 85)
§b
Aquargb(85, 255, 255)
§c
Redrgb(255, 85, 85)
§d
Light Purplergb(255, 85, 255)
§e
Yellowrgb(255, 255, 85)
§f
Whitergb(255, 255, 255)

Formatting codes

CodeNameWhat it doesWorks on
ObfuscatedScrambled glyphs, same width as the originalJava & Bedrock
BoldHeavier strokeJava & Bedrock
StrikethroughLine through the textJava only
UnderlineLine under the textJava only
ItalicSlanted textJava & Bedrock
ResetDrops every colour and formatJava & Bedrock

Bedrock-only material colors

Thirteen extra values that Java renders as literal text. They are named after in-game materials, which is why they look like metals and ores rather than the dye palette above.

§g
Minecoin Gold
§h
Material Quartz
§i
Material Iron
§j
Material Netherite
§m
Material Redstone
§n
Material Copper
§p
Material Gold
§q
Material Emerald
§s
Material Diamond
§t
Material Lapis
§u
Material Amethyst
§v
Material Resin
§w
Light Blue

How the system works

A colour code is two characters: the section sign and one letter or digit. §0 through §9 then §a through §f cover the sixteen colours, and the formatting codes sit in the same alphabet. The client reads them while drawing, so they cost characters but no layout — which is why a MOTD can be two lines and still be styled.

The palette is not arbitrary: it is the 1981 CGA text palette, with one exception at gold. That inheritance is why the colours feel oddly specific — #AA0000 instead of a round red, #55FF55 for green.

§, &, \u00A7 and JSON

Four notations, four situations. § is what the client actually reads. & is a server-plugin convenience that gets translated to § at runtime — vanilla ignores it. \u00A7 is how you write the section sign inside server.properties or a JSON string, because the raw character does not survive those formats. And a JSON text component with a color key is the only way to get a colour outside the sixteen.

Snippets that work as-is

A MOTD in server.properties: motd=\u00A76\u00A7lMy Server \u00A77| \u00A7aOpen. A team prefix: §c[Admin] §r — the reset matters, or the prefix bleeds into every message that follows. A sign line: §lWelcome §r§7back. And a tellraw component: {"text":"Hi","color":"gold","bold":true}.

The four traps, in order of how often they bite: putting a colour after a format on Java (the colour wins and the format dies); forgetting §r after a prefix; using & where vanilla is reading; and expecting §m to mean strikethrough on Bedrock, where it is a colour.

Questions this page gets asked

What is the § symbol in Minecraft?+

The section sign. Minecraft uses it as the prefix for every legacy colour and formatting code — §6 is gold, §l is bold. You only type one character after it, so a full colour change costs two characters.

Can I use & instead of §?+

On most server software, yes. Spigot, Paper, BungeeCord and Velocity translate & into § at runtime, which is why plugin configs are full of &c and &7. Vanilla Minecraft does not understand &, so anything you edit by hand in a data pack, NBT tag or server.properties needs the real § (or \u00A7).

Why does my bold text stop being bold after a colour change?+

In Java Edition a colour code clears every active format, so §c§lRed then §aGreen gives plain green. Put the colour first and repeat the format after it: §a§lGreen. Bedrock keeps formats across colour changes, which is one of the few places the two editions diverge visibly.

Are §m and §n the same on both editions?+

No. On Java they are strikethrough and underline. On Bedrock those two letters are colours — §m is material_redstone and §n is material_copper — and strikethrough and underline do not exist at all. A book that looks correct on Java can come out red-brown on Bedrock.

Can I use any hex colour?+

Since 1.16, yes — but not through §. Arbitrary colours go in a JSON text component, for example {"text":"Hi","color":"#FF8800"}, which is what resource pack language files and command book pages use. §#FF8800 is not a colour code and will render as literal text.

Where do color codes actually work?+

Server MOTD in server.properties (written as \u00A7), signs, book and quill pages (Java, via NBT or commands), team prefixes and suffixes, /tellraw and /title output, and any plugin message. In vanilla chat you cannot type them. In Bedrock the section sign works in signs, world names, book text, anvil renames and the chat field.