Color codes (Formatting codes) add color and modifications to text in-game. Text in Minecraft is able to be formatted with the section sign. In Minecraft BE, the section sign is able to be entered into world names, signs, renaming items and in the chat.
In Minecraft Java Edition, section signs can be used in server.properties, pack.mcmeta, world titles, and server names. External programs may be used to insert it in other locations.
Text is able to be formatted using the section sign followed by a character. A section sign symbol followed by a hex digit in the message tells the client to switch colors while displaying text. In Minecraft BE, the § symbol can be used in any text input, while in Minecraft Java Edition, it may be used in server.properties, pack.mcmeta, world titles, and server names.
In Minecraft JE, if a color code is used after a formatting code, the formatting code is disabled beyond the color code point. Therefore, once using a color code in tandem with a formatting code, make sure the color code is used first and reuse the formatting code when changing colors. In Minecraft BE, formatting codes persist after a color code. If an obfuscated code is used and a reset code is not used before the end of the line, the client GUI will continue to obfuscate text past the MOTD and into the version number display.
Messages sent from the server to the client are able to contain color codes, that allow coloring of text for various purposes.
The random characters that are placed after §k are always the same width as the original one. In an example, any random character cycled through where the letter “m” will be wide characters while any random character in the spot of an “i” will be narrow characters. §r resets the styles of following characters.
USE IN WORLD NAMES
With the use of external tools, such as NBTExplorer, world names have custom colors and formatting codes. To modify the name, select the LevelName tag in the world’s level.dat. In addition, you are able to rename the world’s folder to contain one of the codes. In the world selection menu, the specified color (effect) appears. Also, you are able to use a resource pack with a § already in the world name once making a world.
In Minecraft Bedrock Edition, you are allowed to use a § inside of the world name once you are making the world. This lets for using custom colors and formatting codes inside of the world name without having to modify the game.