Color codes

Apply Minecraft color and formatting codes to text.

Color codes customise the color and formatting of text - in chat, on signs, in titles, in forms, and more. Each code is the section sign (§) followed by a character. Endstone exposes them through ColorFormat, so you don't type the raw codes.

Usage

from endstone import ColorFormat

text = f"This is {ColorFormat.YELLOW}yellow, {ColorFormat.AQUA}aqua and {ColorFormat.GOLD}gold{ColorFormat.RESET}."

End colored text with ColorFormat.RESET to clear all color and formatting options.

All color and format codes

For the full list of codes and their names, see Formatting codes on the Minecraft Wiki. Every code maps to a ColorFormat member.

On this page