Skip to content

Commit

Permalink
modified README
Browse files Browse the repository at this point in the history
  • Loading branch information
kikito committed May 15, 2011
1 parent 210a5f2 commit dd4c414
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 22 deletions.
22 changes: 0 additions & 22 deletions README.md

This file was deleted.

54 changes: 54 additions & 0 deletions README.textile
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@

0 comments on commit dd4c414

Please sign in to comment.