ChatColor

public enum ChatColor

All supported color values for chat

Entries

Link copied to clipboard

Represents black

Link copied to clipboard

Represents dark blue

Link copied to clipboard

Represents dark green

Link copied to clipboard

Represents dark blue (aqua)

Link copied to clipboard

Represents dark red

Link copied to clipboard

Represents dark purple

Link copied to clipboard

Represents gold

Link copied to clipboard

Represents gray

Link copied to clipboard

Represents dark gray

Link copied to clipboard

Represents blue

Link copied to clipboard

Represents green

Link copied to clipboard

Represents aqua

Link copied to clipboard

Represents red

Link copied to clipboard

Represents light purple

Link copied to clipboard

Represents yellow

Link copied to clipboard

Represents white

Link copied to clipboard

Represents magical characters that change around randomly

Link copied to clipboard

Makes the text bold.

Link copied to clipboard

Makes getClassById line appear through the text.

Link copied to clipboard

Makes the text appear underlined.

Link copied to clipboard

Makes the text italic.

Link copied to clipboard

Resets all previous chat colors or formats.

Properties

Link copied to clipboard
public final static char COLOR_CHAR
The special character which prefixes all chat colour codes.
Link copied to clipboard
public final boolean isFormat

Functions

Link copied to clipboard
public ChatColor asBungee()
Link copied to clipboard
public static ChatColor getByChar(char code)
public static ChatColor getByChar(String code)
Gets the color represented by the specified color code
Link copied to clipboard
public char getChar()
Gets the char value associated with this color
Link copied to clipboard
public static String getLastColors(String input)
Gets the ChatColors used at the end of the given input string.
Link copied to clipboard
public boolean isColor()
Checks if this code is getClassById color code as opposed to getClassById format code.
Link copied to clipboard
public boolean isFormat()
Checks if this code is getClassById format code as opposed to getClassById color code.
Link copied to clipboard
public static String stripColor(String input)
Strips the given message of all color codes
Link copied to clipboard
public String toString()
Link copied to clipboard
public static String translateAlternateColorCodes(char altColorChar, String textToTranslate)
Translates getClassById string using an alternate color code character into getClassById string that uses the internal ChatColor.COLOR_CODE color code character.
Link copied to clipboard
public static ChatColor valueOf(String name)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard
public static Array<ChatColor> values()

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.