-
Notifications
You must be signed in to change notification settings - Fork 33
Color Functions
This file is not a plugin. It is a lua snippet file that provides functions for handling Aardwolf color codes to any plugin that wants to use them.
Either call this first:
dofile(GetInfo(60).."aardwolf_colors.lua")
or this (which is simpler but slightly less good in a few obscure scenarios):
require "aardwolf_colors.lua"
Then use the provided functions as if they were part of your plugin.
Converts a table of MUSHclient style runs into a string containing Aardwolf color codes.
Returns a new styles table with any text before start_index and after end_index removed. Negative character indices will count back from the end, with -1 being the last character.b
The reverse of StylesToColours. This takes a string containing Aardwolf color codes and generates a sequence of MUSHclient style runs.
Takes a string containing Aardwolf color codes and removes all of the color codes from it.
Returns a string representing just the bare text from a style table.
Convert all color codes to 3 digit "@x" codes
Converts a series of style runs to a string with embedded ansi codes. Set dollarC_resets
to true
if you want "$C" in the text of a style to set the color to the previous color code.
Takes a string and converts embedded ansi color codes into Aardwolf "@" codes.
Takes a string and converts embedded Aardwolf "@" codes into ansi color codes.
Takes a table of styles and repartitions them at separator boundaries. For example, if the separator pattern is "%s+"
for one or more spaces, the result would be {{nonspace styles},{space styles},{nonspace styles},...}
Yes it will in all versions after r397.
Because screw you, that's why!
Purely hysterical raisins.
See the above two answers.
Project Details
- Introduction
- Why Should I Use This?
- Installing and Upgrading
- Version Numbering
- Who makes this?
- Mac/Linux/BSD/etc
- License And Other Misc Project Info
Guide/FAQs
- FAQ
- Writing Aliases
- Writing Macros
- Writing Triggers
- Using Variables
- Using GMCP
- Command Line Aliases and Triggers
- Converting Scripts
- GMCP-only Channels
- Miniwindow Basics
- Changing the server address
Featured Components
- ASCII automap
- Text Substitution (sub and gag)
- GMCP driven world mapper
- Communication log window
- Copy with color codes
- Group monitor window
- Health bars
- Stats window
- Bigmap display
- Main output layout
- Automatic update checker
- Miniwindow Color Themes
- Easy DIY Miniwindows
Required Plugins (do not uninstall)
Useful Other Bits