color

fun color(text: String): String

Converts color codes in the text using '&' to the Minecraft-compatible format.

This method will replace all occurrences of '&' followed by a character with the corresponding Minecraft color. For example, "&cHello" will turn into red-colored text.

Return

The string with colors applied.

Parameters

text

The string that may contain Minecraft color codes.