Colors Formatting - Minenash/CustomHUD GitHub Wiki
There's 2 ways to add color to your HUD: Minecraft/Bukkit color codes, and custom hex codes.
Note: §r
/&r
resets to the foreground color (white unless set by the foreground flag) unless their was a custom hex code on the line. If there is, it'll reset to the last custom hex code.
Minecraft/Bukkit Color Codes
You can find information about Minecraft Color Codes, and a list of all available ones, on the Minecraft Wiki. The Bukkit variant is the same but replaces the §
with &
. This was done, because you can't type the § into minecraft itself, so servers started using &
instead.
Example:
&a{fps}&r fps
creates
Custom Hex Codes
Custom hex colors can be done with the following syntax: &{#FF00FF00}
and it's format is argb (alpha, red, blue, green), so the first two hexadecimal digits are the alpha, the next two are the red, and so on. The #
is optional and can also be replaced with 0x
.
Example:
&{FF98FB98}{fps}&f fps
creates