Formatting Text
But isn't just text a bit boring? Worry not, as Minecraft has support for colors, styles and other formatting options in chat. Most of the options also work with item and entity names.Colors
Minecraft has 16 pre-set color codes to be used in text. Skript supports them in two different ways:- Color name tags, for example <red>
- (Old) Minecraft color codes, like §c; using & works, too
Here's a table of all colors, including both Skript names and color codes:
Code | Name | Alternative Names |
§0 | black | |
§1 | blue | dark blue |
§2 | green | dark green |
§3 | cyan | aqua, dark cyan, dark aqua, dark turquoise, dark turquois |
§4 | red | dark red |
§5 | purple | dark purple |
§6 | orange | orange, gold, dark yellow |
§7 | grey | light grey, gray, light gray, silver |
§8 | grey | light grey, gray, light gray, silver |
§9 | light blue | light blue, indigo |
§a | light green | lime, lime green |
§b | light cyan | light aqua, turquoise, turquois, light blue |
§c | light red | pink |
§d | magenta | light purple |
§e | yellow | light yellow |
§f | white |
In Minecraft 1.16, support was added for 6-digit hexadecimal colors to specify custom colors other than the 16 default color codes. A new tag can be used to format with these colors. The tag looks like this: <#hex code>
.
Here's what the tag would look like when used in a script: send "<#123456>Hey %player%!" to player
For information not related to Skript, see Minecraft Wiki page concerning colors. Note that depending on Skript configuration, color codes may do more than just change color of text after them. By default, for backwards compatibility, they clear following styles: magic, bold, strikethrough, underlined, italic. Other styles are not affected, and this feature can be toggled of in config.sk.
Other Styles
Minecraft also has various other styles available. The following are available everywhere, including item and entity names:Code | Name | Alternative Names |
§k | magic | obfuscated |
§l | bold | b |
§m | strikethrough | strike, s |
§n | underlined | underline, u |
§o | italic | italics, i |
§r | reset | r |
Skript also supports certain newer features, which are only available in chat. Those do not have formatting codes, so you must use tags for them.
Name | Alternative Names | Description |
link | open url, url | Opens a link when player clicks on text |
run command | command, cmd | Makes player execute a chat command when they click on text |
suggest command | Adds a command to chat prompt of player when clicked | |
tooltip | show text | Shows a tooltip when player hovers over text with their mouse |
Text and Variables
Variable names are text, but obviously formatting that text does no good. However, everything else you can do for text, you can do for variable names. A guide about this is coming... some day.Guide written by bensku.