Static class with definitions of Minecraft color codes, parsers, converters, and utilities.
More...
|
| static string | GetName (char code) |
| | 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.
|
| |
| static string | GetName ([CanBeNull] string color) |
| | Looks up color name for the given color string. Accepts any input format that is recognized by Color.Parse(String).
|
| |
| static string | Parse (char code) |
| | 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.
|
| |
| static string | Parse ([CanBeNull] string color) |
| | 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.
|
| |
| static bool | IsStandardColorCode (char code) |
| | 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.
|
| |
| static bool | IsColorCode (char code) |
| | 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.
|
| |
| static void | SubstituteSpecialColors ([NotNull] StringBuilder sb) |
| | 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.
|
| |
| static string | SubstituteSpecialColors ([NotNull] string input) |
| | 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.
|
| |
| static string | StripColors ([NotNull] string message) |
| | 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.
|
| |
| static void | MinecraftToIrcColors ([NotNull] StringBuilder sb) |
| | Replaces Minecraft color codes with equivalent IRC color codes, in the given StringBuilder. Opposite of IrcToMinecraftColors method.
|
| |
| static string | MinecraftToIrcColors ([NotNull] string input) |
| | Replaces Minecraft color codes with equivalent IRC color codes, in the given string. Opposite of IrcToMinecraftColors method.
|
| |
| static void | IrcToMinecraftColors ([NotNull] StringBuilder sb) |
| | Replaces IRC color codes with equivalent Minecraft color codes, in the given StringBuilder. Opposite of MinecraftToIrcColors method.
|
| |
| static string | IrcToMinecraftColors ([NotNull] string input) |
| | Replaces IRC color codes with equivalent Minecraft color codes, in the given string. Opposite of MinecraftToIrcColors method.
|
| |
|
| const string | Black = "&0" |
| |
| const string | SysDefault = Yellow |
| | Default color of system messages, nickserv, chanserv. Yellow.
|
| |
| const string | HelpDefault = Lime |
| | Default color of help messages, /help. Lime.
|
| |
| const string | SayDefault = Green |
| | Default color of say messages (/say) and timer announcements. Green.
|
| |
| const string | AnnouncementDefault = Green |
| | Default color of announcements, server announcements. Green.
|
| |
| const string | PMDefault = Aqua |
| | Default color of personal messages. Aqua.
|
| |
| const string | IRCDefault = Purple |
| | Default color of IRC chat. Purple.
|
| |
| const string | MeDefault = Purple |
| | Default color of /me command. Purple.
|
| |
| const string | WarningDefault = Red |
| | Default color of warning messages. Red.
|
| |
Static class with definitions of Minecraft color codes, parsers, converters, and utilities.
| static string fCraft.Color.GetName |
( |
char |
code | ) |
|
|
static |
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.
- Parameters
-
| code | Color code character. |
- Returns
- Lowercase color name if input code was recognized; otherwise null.
| static string fCraft.Color.Parse |
( |
char |
code | ) |
|
|
static |
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.
- Parameters
-
| code | Color code character. |
- Returns
- Standard Minecraft ampersand-color-code if input code was recognized; otherwise null.
| static string fCraft.Color.Parse |
( |
[CanBeNull] string |
color | ) |
|
|
static |
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.
- Parameters
-
| color | String representation of a color, empty string, or null. |
- Returns
- If input could be parsed, returns a standard Minecraft ampersand-color-code. If input is an empty string, returns an empty string. If input is null or cannot be parsed, returns null.