forked from hoelzro/ansicolors
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
54 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
h1. ansicolors.lua | ||
|
||
ansicolors is a simple Lua function for printing to the console in color. | ||
|
||
|
||
h1. Installation | ||
|
||
Put the file ansicolors.lua somewhere where your Lua interpreter will be able to find it. Then: | ||
|
||
<pre> | ||
local ansicolors = require 'ansicolors' | ||
</pre> | ||
|
||
h2. Usage | ||
|
||
<pre> | ||
local colors = require 'ansicolors' | ||
print(colors('%{red}hello')) | ||
print(colors('%{redbg}hello{%reset}')) | ||
print(colors('%{bright red underlined}hello')) | ||
</pre> | ||
|
||
h2. Valid attribute list: | ||
|
||
Misc. attributes: | ||
|
||
* @reset@ | ||
* @bright@ | ||
* @dim@ | ||
* @underline@ | ||
* @blink@ | ||
* @reverse@ | ||
* @hidden@ | ||
|
||
Foreground colors: | ||
|
||
* @black@ | ||
* @red@ | ||
* @green@ | ||
* @yellow@ | ||
* @blue@ | ||
* @magenta@ | ||
* @cyan@ | ||
* @white@ | ||
|
||
Background colors: | ||
* @blackbg@ | ||
* @redbg@ | ||
* @greenbg@ | ||
* @yellowbg@ | ||
* @bluebg@ | ||
* @magentabg@ | ||
* @cyanbg@ | ||
* @whitebg@ |