-
Notifications
You must be signed in to change notification settings - Fork 244
How to use RGB color codes
As of 1.16 mojang introduced RGB color support. This allows us to use 256^3 different colors instead of the original 16 ones. This is not supported on <1.16 in any way.
Supported RGB formats:
#RRGGBB
&#RRGGBB
{#RRGGBB}
#<RRGGBB>
&x&R&R&G&G&B&B
Gradients:
<#RRGGBB>Text</#RRGGBB>
{#RRGGBB>}Text{#RRGGBB<}
<$#RRGGBB>Text<$#RRGGBB>
TAB uses the first by default, but is able to accept the other types as well without leaving any characters (such as {}
) behind.
Gradients only support 2 colors, using more will result in an invalid syntax and won't work.
Don't forget to replace RRGGBB
with actual hexadecimal numbers, for example FFAA00
(yes, some people straight up copy "RRGGBB" and ask why is it not working):
This color code has 256 red, 170 green and 0 blue. It is equal to the legacy color 6
(gold/orange).
You can use a tool like this one to easily find suitable colors.
Just like with legacy colors, use color first, then magic codes (in any order). For example with bold: #00FFFF&lText
.
For gradients, put the magic codes at the beginning of text. For example <#00FF00>&lBold gradient text</#FF00FF>
.
In case you accidentally use invalid hex color code, the plugin will simply ignore it and keep it in raw format.
Since <1.16 clients do not understand these color codes, something else must be displayed instead. The plugin will find the closest legacy color to the desired RGB combination and will use that color instead.
If you want to specify a legacy color to use instead of plugin finding the closest one, you can define it by adding |L
after RGB code, where L
is a legacy color to use (0-9 a-f).
Usage for classic codes:
#RRGGBB|L
&#RRGGBB|L
{#RRGGBB|L}
#<RRGGBB|L>
<#RRGGBB|L>
&x&R&R&G&G&B&B|L
For gradients, defining color will result in the whole text having the same color instead of each character converting to closest colors, resulting in color groups. To define it, put |L
after the begin color of gradient.
Usage:
<#RRGGBB|L>Text</#RRGGBB>
{#RRGGBB|L>}Text{#RRGGBB<}
<$#RRGGBB|L>Text<$#RRGGBB>
The plugin offers usage of the font feature introduced in Minecraft 1.16.
Warning! This does NOT refer to different character sets! This refers to different fonts defined in resource packs or MC itself.
The syntax is <font:FONT_NAME>Text</font>
where FONT_NAME
is name of your desired font.
Example
<font:minecraft:alt>This is a text written in minecraft enchantment table language which no one understands</font>
Result
When trying to use both font and RGB or gradients, font must be outside and RGB/gradients inside.
Example
<font:minecraft:alt><#00FF00>This is a colorful text written in minecraft enchantment table language which no one understands, but it looks pretty</#FF0000></font>
Result
- Why TAB?
- Installation
- Commands & Permissions
- Frequently Asked Questions
- Compatibility
- How to assign players into groups
- Known issues
- TAB-Bridge plugin
- Belowname
- Bossbar
- Global playerlist
- Header/Footer
- Layout
- Nametags
- Per world playerlist
- Ping spoof
- Playerlist objective
- RedisBungee support
- Scoreboard
- Sorting in tablist
- Spectator fix
- Tablist name formatting
- Animations
- Conditional placeholders
- Error logging
- MySQL
- Placeholder output replacements
- Placeholders
- RGB/font usage
- Client-sided mechanics
- Quick PlaceholderAPI startup guide
- How to setup compatibility with glow plugins
- How to display name from nickname plugins
- How to configure weights in LuckPerms
- How to save config in UTF-8 encoding
- Mini guides collection
- Additional information
- Optimizing plugin's CPU usage
- Developer API