[This is preliminary documentation and is subject to change.]
The Color type exposes the following methods.
Methods
| Member | Description | |
|---|---|---|
| GetName(Char) | Looks up color name for the given character color code. Codes are case-insensitive.
Both standard (0-F) and fCraft-specific (H, I, M, P, R, S, W, and Y) color codes are accepted.
Assigned (standard) colors are substituted for fCraft-specific color codes. | |
| GetName(Int32) | Looks up color name for the given numeric color code. | |
| GetName(String) | Looks up color name for the given color string.
Accepts any input format that is recognized by Color.Parse(String). | |
| IrcToMinecraftColors(String) | Replaces IRC color codes with equivalent Minecraft color codes, in the given string.
Opposite of MinecraftToIrcColors method. | |
| IrcToMinecraftColors(StringBuilder) | Replaces IRC color codes with equivalent Minecraft color codes, in the given StringBuilder.
Opposite of MinecraftToIrcColors method. | |
| IsColorCode(Char) | Checks whether a color code is valid. Both uppercase and lowercase digits are accepted.
Both standard (0-F) and fCraft-specific (H, I, M, P, R, S, W, and Y) color codes are accepted. | |
| IsStandardColorCode(Char) | Checks whether a color code is valid (is a recognized standard color code).
Standard color codes are hexadecimal digits. Both uppercase and lowercase digits are accepted.
Does not recognize fCraft-specific color codes. | |
| MinecraftToIrcColors(String) | Replaces Minecraft color codes with equivalent IRC color codes, in the given string.
Opposite of IrcToMinecraftColors method. | |
| MinecraftToIrcColors(StringBuilder) | Replaces Minecraft color codes with equivalent IRC color codes, in the given StringBuilder.
Opposite of IrcToMinecraftColors method. | |
| Parse(Char) | Converts the given character color code into standard representation (ampersand-color-code).
Codes are case-insensitive.
Both standard (0-F) and fCraft-specific (H, I, M, P, R, S, W, and Y) color codes are accepted.
Assigned (standard) colors are substituted for fCraft-specific color codes. | |
| Parse(String) | Converts the given character color code into standard representation (ampersand-color-code).
Accepts 2-character ampersand color codes, single character codes, and color names.
Does not accept 2-character percent-codes. All input is case-insensitive.
Both standard (0-F) and fCraft-specific (H, I, M, P, R, S, W, and Y) color codes are accepted.
Assigned (standard) colors are substituted for fCraft-specific color codes. | |
| StripColors(String) | Strips Minecraft color codes from a given string.
Removes all ampersand-character sequences, including standard, fCraft-specific color codes, and newline codes.
Does not remove percent-color-codes. | |
| SubstituteSpecialColors(String) | Substitutes all fCraft-specific ampersand color codes (like &S/Color.Sys)
with the assigned Minecraft colors (like &E/Color.Yellow).
Strips any unrecognized sequences. Does not replace percent-codes.
Note that LineWrapper itself does this substitution internally. | |
| SubstituteSpecialColors(StringBuilder) | Substitutes all fCraft-specific ampersand color codes (like &S/Color.Sys)
with the assigned Minecraft colors (like &E/Color.Yellow).
Strips any unrecognized sequences. Does not replace percent-codes.
Note that LineWrapper itself does this substitution internally. |