CMObject, Tickable, CMLibrary, ColorLibrary, java.lang.Cloneable, java.lang.Comparable<CMObject>public class Brown extends StdLibrary implements ColorLibrary
ColorLibrary.Color, ColorLibrary.Color256, ColorLibrary.ColorState, ColorLibrary.SpecialColor| Modifier and Type | Field | Description | 
|---|---|---|
| protected java.util.Map<java.lang.String,ColorLibrary.Color> | ansiColorMap | |
| protected java.util.Map<java.lang.Character,ColorLibrary.Color> | bgCodeMap | |
| protected java.lang.String[] | clookup | |
| protected ColorLibrary.Color256[] | color256s | |
| protected java.util.Map<java.lang.Short,ColorLibrary.Color> | color256to16map | |
| protected java.lang.String[] | htlookup | 
idConverterCOLORCODE_BACKGROUND, COLORCODE_BANSI256, COLORCODE_FANSI256, COLORS_INCARDINALORDERisDebugging, name, serviceClient, tickStatusSTATUS_AFFECT, STATUS_ALIVE, STATUS_BEHAVIOR, STATUS_CLASS, STATUS_DEAD, STATUS_END, STATUS_FIGHT, STATUS_MISC, STATUS_MISC2, STATUS_MISC3, STATUS_MISC4, STATUS_MISC5, STATUS_MISC6, STATUS_MISC7, STATUS_NOT, STATUS_OTHER, STATUS_RACE, STATUS_REBIRTH, STATUS_SCRIPT, STATUS_START, STATUS_WEATHER, TICKID_AREA, TICKID_BALLISTICK, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EVENT, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MISCELLANEOUS, TICKID_MOB, TICKID_PROPERTY_SPECIAL, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SHORTERMASK, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET| Constructor | Description | 
|---|---|
| Brown() | 
| Modifier and Type | Method | Description | 
|---|---|---|
| boolean | activate() | Activates the library. | 
| void | clearLookups() | Clears the color code lookup tables so that the next
 translations will come from the properties. | 
| protected char | findCodeChar(java.lang.String name) | |
| protected ColorLibrary.SpecialColor | findCodeColor(java.lang.String name) | |
| java.lang.String[] | fixPlayerColorDefs(java.lang.String colorDefs) | Translates encoded color definition overrides into a
 completed color mapping, where mappings are from char
 code ints to either escape strings, or more defs. | 
| CMMsg | fixSourceFightColor(CMMsg msg) | Does nothing more impressive than adding the color codes
 for combat to the source and target messages if possible. | 
| protected void | generateRecipes() | |
| ColorLibrary.Color | getANSI16Equivalent(short color256Code) | Returns the ANSI 16 color equivalent to the given
 CM-encoded ANSI 256 color. | 
| java.lang.String | getBackgroundAnsiCode(java.lang.String ansi) | Returns the background ansi code associated with the given
 foreground ansi code, or null if no match. | 
| protected java.util.Map<java.lang.Character,ColorLibrary.Color> | getBackgroundCodeMap() | |
| java.lang.String | getBackgroundHtmlTag(char codeC) | Given a color code (bg or fg), this method will return
 the appropriate html tag for the background color. | 
| java.lang.String | getColorInfo(boolean doAll256) | Returns a friendly readable chart of colors,
 formatted for 80 columns. | 
| java.util.Enumeration<ColorLibrary.Color256> | getColors256() | Returns an enumeration of the supported ansi-256 colors
 that are supported by the system in general. | 
| ColorLibrary.ColorState | getNormalColor() | A ColorState object that represents the basic normal
 color, typically grey with no background. | 
| java.lang.String | ID() | The CoffeeMud Java Class ID shared by all instances of
 this object. | 
| java.lang.String | mixColorCodes(java.lang.String code1,
             java.lang.String code2) | Given a foreground and background set of ansi escape codes,
 this method generates a single useable ansi escape code
 from the two. | 
| java.lang.String | mixHTMLCodes(java.lang.String code1,
            java.lang.String code2) | Given a foreground and background set of html tags,
 this method generates a single useable html tag
 from the two. | 
| java.lang.String[] | standardColorLookups() | Returns the standard ansi escape color lookup table, which
 maps an array indexed by the ^ color codes to an ansi escape
 color | 
| java.lang.String[] | standardHTMLlookups() | Returns the standard html tag lookup table, which
 maps an array indexed by the ^ color codes to an html
 tag. | 
| java.lang.String | translateANSItoCMCode(java.lang.String code) | Translates an ansi escape sequence to a
 basic 16 or special color code, anything
 that starts with ^ to the . | 
| java.lang.String | translateCMCodeToANSI(java.lang.String code) | Translates a basic 16 or special color code, anything
 that starts with ^ to the ansi escape sequence. | 
| java.lang.String | translateCMCodeToFGNumber(java.lang.String code) | |
| protected int | translateSingleCMCodeToANSIOffSet(java.lang.String code) | |
| ColorLibrary.ColorState | valueOf(char fg,
       char bg) | Generates a new ColorState object from the given
 foreground and background basic 16 ^ color codes. | 
getServiceClient, L, propertiesLoaded, shutdowncopyOf, initializeClass, name, newInstanceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckDatabase, compareTo, copyOf, getServiceClient, getTickStatus, initializeClass, L, name, newInstance, propertiesLoaded, setThreadStatus, shutdown, tickprotected java.lang.String[] clookup
protected java.lang.String[] htlookup
protected ColorLibrary.Color256[] color256s
protected final java.util.Map<java.lang.Character,ColorLibrary.Color> bgCodeMap
protected final java.util.Map<java.lang.String,ColorLibrary.Color> ansiColorMap
protected final java.util.Map<java.lang.Short,ColorLibrary.Color> color256to16map
public java.lang.String ID()
CMObjectID in interface CMObjectID in class StdLibrarypublic final ColorLibrary.ColorState getNormalColor()
ColorLibrarygetNormalColor in interface ColorLibraryColorLibrary.ColorStatepublic final ColorLibrary.ColorState valueOf(char fg, char bg)
ColorLibraryvalueOf in interface ColorLibraryfg - the foreground color code charbg - the background color code charColorLibrary.ColorStateprotected int translateSingleCMCodeToANSIOffSet(java.lang.String code)
public java.lang.String translateCMCodeToFGNumber(java.lang.String code)
protected java.util.Map<java.lang.Character,ColorLibrary.Color> getBackgroundCodeMap()
public java.lang.String getBackgroundHtmlTag(char codeC)
ColorLibrarygetBackgroundHtmlTag in interface ColorLibrarycodeC - the color codepublic java.lang.String getBackgroundAnsiCode(java.lang.String ansi)
getBackgroundAnsiCode in interface ColorLibraryansi - the foreground ansi colorpublic java.lang.String[] fixPlayerColorDefs(java.lang.String colorDefs)
ColorLibraryfixPlayerColorDefs in interface ColorLibrarycolorDefs - the encoded colorDef to translatepublic java.lang.String translateCMCodeToANSI(java.lang.String code)
ColorLibrarytranslateCMCodeToANSI in interface ColorLibrarycode - the ^ codeColorLibrary.translateANSItoCMCode(String)public java.lang.String translateANSItoCMCode(java.lang.String code)
ColorLibrarytranslateANSItoCMCode in interface ColorLibrarycode - ansi escape sequenceColorLibrary.translateCMCodeToANSI(String)public java.lang.String mixHTMLCodes(java.lang.String code1,
                                     java.lang.String code2)
ColorLibrarymixHTMLCodes in interface ColorLibrarycode1 - the first html tagcode2 - the other html tag, or nullColorLibrary.mixColorCodes(String, String)public java.lang.String mixColorCodes(java.lang.String code1,
                                      java.lang.String code2)
ColorLibrarymixColorCodes in interface ColorLibrarycode1 - the first ansi escape codecode2 - the other ansi escape code, or nullColorLibrary.mixHTMLCodes(String, String)public CMMsg fixSourceFightColor(CMMsg msg)
ColorLibraryfixSourceFightColor in interface ColorLibrarymsg - the message to colorizeprotected final ColorLibrary.SpecialColor findCodeColor(java.lang.String name)
protected final char findCodeChar(java.lang.String name)
public java.lang.String[] standardHTMLlookups()
ColorLibrarystandardHTMLlookups in interface ColorLibraryColorLibrary.standardColorLookups()public void clearLookups()
ColorLibraryclearLookups in interface ColorLibrarypublic java.lang.String[] standardColorLookups()
ColorLibrarystandardColorLookups in interface ColorLibraryColorLibrary.standardHTMLlookups()public java.lang.String getColorInfo(boolean doAll256)
ColorLibrarygetColorInfo in interface ColorLibrarydoAll256 - true to send all 256, false for 16protected void generateRecipes()
public boolean activate()
CMLibraryactivate in interface CMLibraryactivate in class StdLibraryCMLibrary.shutdown()public ColorLibrary.Color getANSI16Equivalent(short color256Code)
ColorLibrarygetANSI16Equivalent in interface ColorLibrarycolor256Code - the CM-encoded 256 color numberpublic java.util.Enumeration<ColorLibrary.Color256> getColors256()
ColorLibrarygetColors256 in interface ColorLibrary