Hex & RGB Colored Text in Minecraft

Since Java Edition 1.16, Minecraft supports full Hex and RGB text colors alongside the classic 16-color palette. This guide covers how to use custom hex codes in vanilla commands, server plugins, and configuration files, as well as the differences between Java and Bedrock text formatting.

Gradient Text GeneratorColor Code Text Editor

How Hex & RGB Colors Work in Minecraft

Minecraft Java Edition added support for full RGB colors in version 1.16. Instead of being limited to 16 preset colors, you can define any color using a six-digit hexadecimal code in the format #RRGGBB, where RR is red, GG is green, and BB is blue.

When Minecraft renders colored text, it automatically generates a drop shadow behind the characters to keep them readable. The shadow color is calculated by taking the main text color and dividing each RGB channel by 4.

Keep these edition and server limitations in mind before starting:

Using Hex Colors in Vanilla Java Commands (JSON)

In vanilla Java Edition, you cannot type the section symbol (§) directly into the chat box. To use hex colors without plugins, you must use JSON text components inside commands by setting the "color" property to a #RRGGBB value.

Follow these steps to run a hex-colored command:

  1. Open your chat window or place a Command Block.
  2. Write a command that accepts raw JSON text, such as /tellraw or /title.
  3. Add "color":"#RRGGBB" inside the JSON object.

Copy and paste these examples directly into your game:

1. Send a single hex-colored chat message:

/tellraw @a {"text":"Welcome to the server!","color":"#FF8800"}

2. Combine multiple hex colors and bold formatting in one line:

/tellraw @a [{"text":"[ALERT] ","color":"#FF0055","bold":true},{"text":"The event is starting now.","color":"#00FFAA","bold":false}]

3. Display a hex-colored screen title:

/title @a title {"text":"Boss Defeated","color":"#AA00FF"}

Hex Color Formats for Server Plugins (Spigot, Paper, MiniMessage)

If you run a multiplayer server or have chat permissions on one, plugins let you use hex colors in chat, prefixes, and configuration files without writing raw JSON. Most plugins accept the ampersand (&) in place of the section symbol (§).

Depending on your server software and plugins, use one of these three formats:

Here is how the exact same orange color (#FF8800) looks across each plugin format:

EssentialsX / CMI: &#FF8800Hello Players!
Spigot Legacy (&): &x&F&F&8&8&0&0Hello Players!
Spigot Legacy (§): §x§F§F§8§8§0§0Hello Players!
MiniMessage Solid: <#FF8800>Hello Players!
MiniMessage Gradient: <gradient:#FF8800:#55FFFF>Hello Players!</gradient>

Standard 16 Color Codes & Formatting Reference (Java)

When configuring a vanilla server.properties MOTD or working with features that do not support hex, use the 16 built-in color codes and 6 formatting codes. In plugins, prefix these with &; in configuration files, prefix them with §. In JSON commands, use the full name (such as "color":"dark_aqua").

Text Formatting Codes:

Important Java Rule: In Java Edition, applying a color code automatically resets all active formatting codes. Always write the color code first and the formatting code second. For example, write &c&lWarning (or &#FF5555&lWarning) to get bold red text. Writing &l&cWarning will cancel the bold effect.

Bedrock Edition Color Codes & How to Type §

While Bedrock Edition does not support custom hex codes, it allows players to type the section symbol (§) directly in vanilla survival gameplay on signs, in books, and when renaming items in an anvil. On Windows, you can type § by holding Alt and typing 0167 on the number pad.

In addition to the standard 0–9 and a–f codes, Bedrock includes extra material color codes:

Note that because m (material_redstone) and n (material_copper) are assigned to colors on Bedrock Edition, strikethrough and underline formatting do not exist in Bedrock.

Questions

Can I use Hex or RGB colors in Minecraft Bedrock Edition?

No. Bedrock Edition does not support hex text colors. Instead, Bedrock players can use the 16 standard color codes plus extra material color codes (such as §s for diamond and §u for amethyst) directly on signs, books, and anvils.

Why does my bold or italic formatting disappear when I add a color?

In Java Edition, any color code resets all previous formatting codes. To fix this, always place the color code before the formatting code (for example, use &c&lText or &#FF8800&lText instead of &l&cText).

Can I use hex colors in my vanilla server.properties MOTD?

No. A vanilla server.properties MOTD only supports the 16 standard color codes (0-9 and a-f) and standard formatting codes. To use hex colors in a server list MOTD, you must use a server plugin or proxy plugin that supports custom MOTDs.

How do I type the § symbol on Windows?

Hold down the Alt key and type 0167 on your keyboard's number pad, then release Alt. Keep in mind that vanilla Java Edition blocks you from typing § in chat, so you should use JSON commands or plugin & codes there instead.

Related guides

See all →