public class TextColorUtils
extends java.lang.Object
TextUtils.replaceRGBColors(TextComponent), but keep in mind that many details will be lost.| Constructor and Description |
|---|
TextColorUtils() |
| Modifier and Type | Method and Description |
|---|---|
static TextComponent |
gradient(java.lang.String s,
TextFormatting... colors)
Color a string with a gradient of
TextFormattings.The text color is interpolated between the given colors. If no colors are given a new StringComponent is returned.If one color is given the text will only be colored with that color. |
static TextComponent |
rainbow(java.lang.String s)
Color a string with a rainbow gradient.
The text color is interpolated between the given colors. |
public static TextComponent gradient(java.lang.String s, TextFormatting... colors)
TextFormattings.StringComponent is returned.s - The string to colorcolors - The colors to usepublic static TextComponent rainbow(java.lang.String s)
s - The string to color