
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.
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.
§0 (Hex: #000000)§1 (Hex: #0000AA)§2 (Hex: #00AA00)§3 (Hex: #00AAAA)§4 (Hex: #AA0000)§5 (Hex: #AA00AA)§6 (Hex: #FFAA00)§7 (Hex: #AAAAAA)§8 (Hex: #555555)§9 (Hex: #5555FF)§a (Hex: #55FF55)§b (Hex: #55FFFF)§c (Hex: #FF5555)§d (Hex: #FF55FF)§e (Hex: #FFFF55)§f (Hex: #FFFFFF)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.
§g§h§i§j§m§n§p§q§s§t§u§vFormatting codes alter the appearance of the text beyond its color. Here are the available style codes:
§k§l§m§n§o§rBecause 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.
§c§lWarning!§l§cWarning!§6§l§oLegendary Sword§a§lGreen Bold §rPlain TextTo enter raw color codes directly in supported text fields, you need to input the section sign (§).
0167 on your dedicated number pad, then release the Alt key.¶) or the ampersand (&) to reveal the § option, depending on your system keyboard layout.§.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.
§ symbol followed immediately by your chosen color code (and optional format code) with no spaces in between.§ 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 BookJava 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 & MinigamesIn 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).
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.
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.
The text shadow color is automatically generated by taking the main text color and dividing each of its RGB channels by 4.