§ codes and colors
In Minecraft, colored text uses codes with the § symbol followed by a character: 0 to 9 and a to f for the 16 colors, k to o for formats and r to reset. In JSON components, colors appear by name (such as green) or in hexadecimal, in the form "#rrggbb", accepted since version 1.16.
This page converts text with § codes into a JSON component, with a live preview. It also accepts the &#rrggbb notation, used here only for typing; in the JSON, the color comes out as "#rrggbb".
In Java Edition, a color code turns off the formatting that comes before it, according to the Minecraft Wiki. So, to keep bold after a color, repeat the bold code.
Tool
Use § followed by the code. For hexadecimal, write &#rrggbb (this site's notation).
Preview
JSON component
Code reference
| Code | Color in the command | Text color (Java) |
|---|---|---|
| §0 | black | #000000 |
| §1 | dark_blue | #0000AA |
| §2 | dark_green | #00AA00 |
| §3 | dark_aqua | #00AAAA |
| §4 | dark_red | #AA0000 |
| §5 | dark_purple | #AA00AA |
| §6 | gold | #FFAA00 |
| §7 | gray | #AAAAAA |
| §8 | dark_gray | #555555 |
| §9 | blue | #5555FF |
| §a | green | #55FF55 |
| §b | aqua | #55FFFF |
| §c | red | #FF5555 |
| §d | light_purple | #FF55FF |
| §e | yellow | #FFFF55 |
| §f | white | #FFFFFF |
| Code | Format |
|---|---|
| §k | obfuscated |
| §l | bold |
| §m | strikethrough |
| §n | underlined |
| §o | italic |
| §r | resets color and formats |
Source: Minecraft Wiki, Formatting codes (Java Edition). Hexadecimal text colors in JSON: Raw JSON text format.
How to use
- Type the text, with § or &#rrggbb codes. Or choose a color from the table to see its code.
- Check the preview: it shows the colors and formats as they look in the game.
- Copy the JSON component and use it in /tellraw or /title.
Frequently asked questions
Why does a color after bold remove the bold?
Because, in Java Edition, a color code turns off the previous formatting, according to the wiki. Repeat the bold code after the color if you want both.
Does &#rrggbb work in the game?
In the game, the hexadecimal color goes into the JSON as "color":"#rrggbb". The &#rrggbb is only a way of typing here.
What is the color of the §7 code?
It is gray, with the value #AAAAAA in Java Edition, according to the wiki's code table.
Does Bedrock Edition have the same colors?
Not all of them. The wiki gives different values for some codes, such as §7, §9 and §c. This page uses the Java Edition values.