How to Use Color Codes in Minecraft (Java & Bedrock)

Minecraft color and formatting codes let you customize text on signs, books, item names, chat, and server messages. This guide covers every code and step-by-step usage for both Java and Bedrock editions.

Color Code Text Editor

All Standard Minecraft Color Codes

Both Java and Bedrock share 16 base color codes. Each code consists of the section symbol (§) or the ampersand symbol (&) on supported multiplayer servers, followed by a single digit or letter. In-game text also renders with a background drop shadow; the shadow color is calculated by taking the main text color and dividing each RGB channel by 4.

Bedrock Edition Extra Material Color Codes

Bedrock Edition includes additional color codes based on in-game materials and currencies. Note that on Bedrock, the letters m and n act as material colors rather than text formatting styles.

Text Formatting Codes and Ordering Rules

Formatting codes alter the appearance of the text beyond its color. Here are the available style codes:

Because Bedrock assigns §m to material_redstone and §n to material_copper, strikethrough and underline formatting do not exist in Bedrock Edition.

Important Rule for Java Edition: In Java, entering a color code automatically resets any active formatting codes. Because of this, you must always write the color code first and the formatting code second.

How to Type the Section Symbol (§)

To enter raw color codes directly in supported text fields, you need to input the section sign (§).

  1. Windows PC: Hold down the Alt key and type 0167 on your dedicated number pad, then release the Alt key.
  2. Touchscreens & Consoles: Open the on-screen keyboard, navigate to the symbols or punctuation menu, and press and hold the paragraph symbol () or the ampersand (&) to reveal the § option, depending on your system keyboard layout.
  3. Copy and Paste: Where pasting is supported, copy the symbol directly from here: §.

Using Color Codes in Bedrock Edition

Bedrock Edition lets players type the § symbol directly into standard gameplay interfaces without needing commands or external tools. You can apply colors and styles in chat, on signs, inside Book and Quill pages, and when renaming items at an anvil.

  1. Open a sign, Book and Quill, chat box, or place an item into an anvil.
  2. Type the § symbol followed immediately by your chosen color code (and optional format code) with no spaces in between.
  3. Type your text. The§ code itself will disappear as you type, and your text will immediately preview in the selected color.

Copyable Bedrock examples:

§s§lDiamond Vault
§pGold §iIron §nCopper
§d§oEnchanted Book

Using Color Codes in Java Edition (Commands & Servers)

Java Edition does not allow you to type or paste the § symbol into the in-game chat box, signs, or anvils during normal vanilla gameplay. Instead, Java players and server owners use two primary methods:

1. Vanilla Commands with JSON Text

In vanilla Java Edition, commands such as /tellraw and /title apply colors and styles using JSON text components with the "color" property and boolean formatting flags.

Copyable JSON command examples:

/tellraw @a {"text":"Server Event Starting!","color":"gold","bold":true}
/tellraw @a [{"text":"[Alert] ","color":"dark_red","bold":true},{"text":"Proceed with caution.","color":"yellow","italic":true}]
/title @a title {"text":"Victory","color":"green","underlined":true}

2. Server Plugins and the Ampersand (&)

Because Java chat blocks the § character, multiplayer server plugins accept the ampersand symbol (&) as a substitute in chat, on signs, and in plugin configuration files. Remember to keep the color code before the formatting code.

&b&lWelcome &7to the &aLobby!
&c&nRead the rules before playing.

3. Server Configuration Files

When editing external text files for a Java server, you can paste the § symbol directly into your text editor, or use its escaped form if required by your file encoding:

§6§lMy Minecraft Server §7- §aSurvival & Minigames

Questions

Why does my bold or italic formatting disappear when I add a color in Java Edition?

In Java Edition, any color code resets all previous formatting codes. Always place the color code before the formatting code (for example, use §c§l instead of §l§c).

Why can't I use strikethrough or underline in Minecraft Bedrock?

In Bedrock Edition, the codes §m and §n are assigned to the colors material_redstone and material_copper. Because of this, strikethrough and underline formats do not exist in Bedrock.

Why can't I type the § symbol in Java Edition chat?

Java Edition blocks the § character in the chat box and standard in-game text fields. To use colors in vanilla Java, use commands with JSON text components (like /tellraw with "color"), or use the & symbol on servers running chat formatting plugins.

How does Minecraft calculate the drop shadow color behind colored text?

The text shadow color is automatically generated by taking the main text color and dividing each of its RGB channels by 4.

Related guides

See all →