This shows you the differences between two versions of the page.
addons:using_libs:color [2015/11/18 22:19] atom0s created |
addons:using_libs:color [2015/11/18 22:28] (current) atom0s |
||
---|---|---|---|
Line 2: | Line 2: | ||
The color library expands the Lua's base string library by adding functions useful for handling FFXI color codes. | The color library expands the Lua's base string library by adding functions useful for handling FFXI color codes. | ||
+ | |||
+ | The following functions are exposed by this library: | ||
+ | |||
+ | //string// **get_ffxi_color**(//number// color); | ||
+ | * **Parameters** | ||
+ | * color - A number between 0 and 512 to represent a color of the FFXI chat log. | ||
+ | * **Returns** | ||
+ | * The color code string of the given color. | ||
+ | |||
+ | //string// **string.color**(//string// s, //number// c, //number// r); | ||
+ | * **Parameters** | ||
+ | * s - The string to colorize. | ||
+ | * c - The color to set the string to. | ||
+ | * r - The color to reset the string to at the end. | ||
+ | * **Returns** | ||
+ | * The colorized string. | ||
+ | |||
+ | //string// **string.stripcolor**(//string// s); | ||
+ | * **Parameters** | ||
+ | * s - The string to strip color codes from. | ||
+ | * **Returns** | ||
+ | * The cleaned string. | ||
+ | |||
+ | //string// **string.stripautotrans**(//string// s); | ||
+ | * **Parameters** | ||
+ | * s - The string to strip auto-translate codes from. | ||
+ | * **Returns** | ||
+ | * The cleaned string. |