Skip to main content

Color

Specifies the enclosed content's color. When evaluating components on an older version, unsupported colors (e.g. hexadecimal) will be converted to known constants, thereby supporting a broad range of versions without having to compromise on modern features.

Immediate

Both the vanilla set of Minecraft's legacy-colors as well as all hexadecimal values may be used as shorthand tag-names.

Legacy Colors

For the sake of brevity, while ensuring compatibility and familiarity, both the constant-names and the ubiquitous ampersand-sequences are supported; keep in mind that the latter also uses tag-notation, as to unify syntax and stick to the new standard.

ColorConstantSequence
green&a
aqua&b
red&c
light_purple&d
yellow&e
white&f
black&0
dark_blue&1
dark_green&2
dark_aqua&3
dark_red&4
dark_purple&5
gold&6
gray&7
dark_gray&8
blue&9

To be used as follows:

<green>Green text</green>
<&b>Aqua text</&b>

Hexadecimal Colors

Since Minecraft version 1.16, hexadecimal colors are now fully supported, enabling the user to access the whole realm of 16.7 million new values. In order to specify such colors, use the pattern #RRGGBB as a tag-name, used as follows:

ColorHex-ValueExample
#E8871E
<#E8871E>My text</#E8871E>
#6883BA
<#6883BA>My text</#6883BA>
#DD99BB
<#DD99BB>My text</#DD99BB>

Dynamic

If the color is to be driven by data, or when values shall be fully custom (for various purposes, like modded clients, etc.), there exists the explicit tag which takes in a value-attribute.

<color value="static value">My text</color>
<color [value]="<expression>">My text</color>