Minecraft Color Codes

Quick reference for all color and formatting codes. Click any card to copy the code.

Color Codes

Formatting Codes

Text Preview

The preview follows Java Edition rules, where a colour code clears any bold, italic, underline or strikethrough still in effect. Bedrock Edition keeps formatting across a colour change, so the same string can render differently there.

The § system, and where it still works

A section sign followed by one character tells the game to change how the following text is drawn. Sixteen characters select a colour, five apply a style, and one resets everything. The sixteen colours above are the chat palette — the colours the game draws text in. They are not the dye colours used on wool, banners and leather, which is the single most common mix-up on this subject and is covered further down.

The § system is formally deprecated. It still works in the places listed below, but new work should use text components, which are more capable and are not going to be quietly narrowed the way § codes have been.

Where you can actually use §, by edition

This differs sharply between editions, and most guides describe only one of them. Java Edition does not accept § in ordinary chat, on signs, or in books.

LocationJava EditionBedrock Edition
Chat input, including /say and /titleNoYes
SignsNoYes
Book and quillNoYes
Anvil and cartography table renamingNoYes
server.propertiesYes
pack.mcmeta, splashes.txt, language filesYes
World titles and server namesYes
Commands in data packs, such as /tellraw and /titleYesYes
Resource pack text shown in gameYesYes

Java Edition has been narrowing this list. Since Java Edition 1.21.6, pasting a section sign into a book is no longer possible, which removed the last way to produce formatted text in survival without external tools.

Bedrock's newer Ore UI screens do not render colour codes at all, so a formatted world name or server name shows its raw codes on those screens.

§m and §n mean different things in each edition

In Java Edition, §m is strikethrough and §n is underline. In Bedrock Edition those two characters are colours: §m is material redstone and §n is material copper. Bedrock has no strikethrough or underline — text using those codes simply comes out coloured.

This is why a server MOTD that looks right on Java can appear in odd browns and reds on Bedrock. If a string has to work on both, avoid §m and §n entirely.

Bedrock-only colour codes

Bedrock added Minecoin gold, and then ten material colours in Bedrock Edition Preview 1.19.80.21 for armour trim tooltips, with resin following in Preview 1.21.50.25. None of these exist in Java Edition, where the same characters are either a formatting code or nothing at all.

CodeNameHex
§gminecoin_gold#DDD605
§hmaterial_quartz#E3D4D1
§imaterial_iron#CECACA
§jmaterial_netherite#443A3B
§mmaterial_redstone#971607
§nmaterial_copper#B4684D
§pmaterial_gold#DEB12D
§qmaterial_emerald#119F36
§smaterial_diamond#2CBAA8
§tmaterial_lapis#21497B
§umaterial_amethyst#9A5CC6
§vmaterial_resin#EB7114

Chat colours are not dye colours

Two completely separate sixteen-colour palettes share most of their names, and confusing them is the reason a banner never quite matches the text above it. The chat palette is bright and built from the values 0x00, 0x55, 0xAA and 0xFF. The dye palette is muted and hand-picked, and it is what tints banners, wool, leather armour, collars, beacon beams and firework stars.

NameChat (§ code)Dye
White#FFFFFF §f#F9FFFE
Red#FF5555 §c#B02E26
Green#55FF55 §a#5E7C16
Blue#5555FF §9#3C44AA
Yellow#FFFF55 §e#FED83D
Black#000000 §0#1D1D21

The dye palette also has colours the chat palette has no name for at all — orange, magenta, lime, brown and cyan among them. There is no § code for brown. If you need a colour outside the sixteen chat values, the answer is a hex colour in a text component, not a § code.

Hex colours, and the modern alternative

Text components replaced § codes as the way to format text, and Java Edition 1.16 added arbitrary hex colours to them. A component is JSON rather than an inline escape:

{"text":"Hello","color":"#3AB3DA","bold":true}

Named colours still work in the same field — "color":"green" is the same as §a. Components also carry things § codes cannot express at all, such as hover text, click actions and translation keys.

Ordering, and the & convention

In Java Edition a colour code clears every active style, so the colour must come first: §c§lText is bold red, while §l§cText is plain red because the colour wipes the bold. Bedrock Edition does not work this way — formatting persists across a colour change — so a string tuned on one edition may need reordering for the other.

Most server software accepts & in configuration files as a stand-in for §, because the section sign is awkward to type and easy to mangle when a file is saved in the wrong encoding. The conversion happens server-side. That convention is why the preview above takes &, and why the copy button converts only those & characters that actually introduce a code.

Typing the section sign

Sources

Minecraft's Formatting Code System

Minecraft uses a special character called the Section Sign (§) followed by a single character to apply colors and formatting to text. It dates from early development and is now formally deprecated in favour of text components, but it remains the fastest way to colour a server name, an MOTD or a splash line, and it is still what most server configuration expects.

The § (Section) Symbol

The section sign (§) is Unicode character U+00A7. It's the control character that tells Minecraft to interpret the following character as a formatting code rather than literal text.

How to type the § symbol:

  • Windows: Alt + 0167 (on numpad) or Alt + 21
  • Mac: Option + 6
  • Linux: Ctrl + Shift + U, then 00A7
  • In-game: Bedrock Edition accepts § in the chat input, on signs, in books and when renaming items. Java Edition does not — there it belongs to configuration files, resource packs, world and server names, and commands in data packs.

Code Structure

Each formatting code consists of two parts:

§ + [code character]

For example, §a produces green text, and §l makes text bold.

Color Code Values (0-9, a-f)

Minecraft uses a hexadecimal-inspired system for its 16 colors:

§0 = Black        §8 = Dark Gray
§1 = Dark Blue    §9 = Blue
§2 = Dark Green   §a = Green
§3 = Dark Aqua    §b = Aqua
§4 = Dark Red     §c = Red
§5 = Dark Purple  §d = Light Purple
§6 = Gold         §e = Yellow
§7 = Gray         §f = White

Formatting Codes (k-o, r)

  • §k - Obfuscated (randomized characters)
  • §l - Bold
  • §m - Strikethrough
  • §n - Underline
  • §o - Italic
  • §r - Reset (removes all formatting)

Code Precedence and Stacking

In Java Edition, a colour code disables any formatting code before it, so the colour has to come first:

§[color]§[format1]§[format2]...Text

§c§lBold Red Text produces bold red text; §l§cRed Text loses the bold. Change colour partway through a bold run and you must repeat the §l. Bedrock Edition behaves the opposite way — formatting persists across a colour code — so the same string is not portable between editions.

Obfuscated text

§k replaces each character with a randomly cycling one of the same width, so the text keeps its original length and layout rather than jittering. Leave a §k unterminated in a server name and Bedrock's client keeps obfuscating past the end of the MOTD and into the version display.

Text components (the modern alternative)

Text components replaced § codes and are what commands and data packs use:

{
  "text": "Hello",
  "color": "green",
  "bold": true
}

Since Java Edition 1.16 the color field also accepts an arbitrary hex value in the form "#RRGGBB", which the sixteen § codes cannot express.

Bedrock Edition differences

  • §m and §n are material colours, not strikethrough and underline. Bedrock has neither.
  • Formatting survives a colour code instead of being cleared by it.
  • Thirteen extra colour codes exist, §g and §h through §w.
  • § works in chat, on signs, in books and when renaming items — all places Java Edition rejects it.
  • Ore UI screens do not render colour codes at all.

The & convention

Server configuration commonly uses & in place of § and converts it before the text reaches the client, because the section sign is awkward to type and easy to corrupt when a file is written in the wrong encoding. The preview above follows the same convention.

References