The formats side by side
Each example is the word Hi in gold and bold.
| Format | Example | Works in |
|---|---|---|
| Section-sign codes | §6§lHi | server.properties (written as §), language files, pack.mcmeta and other resource pack text |
| Ampersand codes | &6&lHi | Plugins that convert them to § codes |
| Hex, section-sign style | §x§f§f§a§a§0§0§lHi | Spigot and BungeeCord based servers and their plugins |
| Hex, ampersand style | &#FFAA00&lHi | Plugins that document this format |
| MiniMessage | <gold><bold>Hi | Paper, Velocity and plugins built on the Adventure library |
| Text component | {"text":"Hi","color":"gold","bold":true} | Vanilla commands such as /tellraw and /title, and data packs |
Since Java Edition 1.21.5, commands read text components as SNBT. The quoted form above is valid SNBT, and so is the shorter {text:"Hi",color:"gold",bold:true}. JSON files in data packs still use JSON.
Colour names in each format
| Colour | § code | JSON color | MiniMessage | Hex |
|---|---|---|---|---|
| Black | §0 | black | <black> | #000000 |
| Dark Blue | §1 | dark_blue | <dark_blue> | #0000AA |
| Dark Green | §2 | dark_green | <dark_green> | #00AA00 |
| Dark Aqua | §3 | dark_aqua | <dark_aqua> | #00AAAA |
| Dark Red | §4 | dark_red | <dark_red> | #AA0000 |
| Dark Purple | §5 | dark_purple | <dark_purple> | #AA00AA |
| Gold | §6 | gold | <gold> | #FFAA00 |
| Gray | §7 | gray | <gray> | #AAAAAA |
| Dark Gray | §8 | dark_gray | <dark_gray> | #555555 |
| Blue | §9 | blue | <blue> | #5555FF |
| Green | §a | green | <green> | #55FF55 |
| Aqua | §b | aqua | <aqua> | #55FFFF |
| Red | §c | red | <red> | #FF5555 |
| Light Purple | §d | light_purple | <light_purple> | #FF55FF |
| Yellow | §e | yellow | <yellow> | #FFFF55 |
| White | §f | white | <white> | #FFFFFF |
Formatting in each format
| Formatting | § code | Text component | MiniMessage | In Bedrock Edition |
|---|---|---|---|---|
| Obfuscated | §k | "obfuscated": true | <obfuscated> | Yes |
| Bold | §l | "bold": true | <bold> | Yes |
| Strikethrough | §m | "strikethrough": true | <strikethrough> | No (§m is a colour) |
| Underline | §n | "underlined": true | <underlined> | No (§n is a colour) |
| Italic | §o | "italic": true | <italic> | Yes |
| Reset | §r | Start a new component | <reset> | Yes |
Rules that differ between formats
- Colour resets formatting in § and & codes. In Java Edition a colour code switches off bold, italic and the rest, so write the colour first. See colour code order.
- Text components and MiniMessage don’t have that rule. Colour and formatting are separate properties.
- Hex colours need a text component, MiniMessage or a plugin. § codes on their own only have the 16 colours. Text components gained hex colours in Java Edition 1.16.
- Bedrock Edition uses § codes, has no hex colours and no strikethrough or underline, and uses
§mand§nfor extra colours.
To try the formats, use the Color Codes preview or the Gradient Generator, which outputs several of them.