Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
a simple terminal text colorizer. simple simple simple. simple.
JavaScript Shell
branch: master

update to documentation

latest commit 6e47d25bce
PagodaJosh authored
Failed to load latest commit information.
colors no global leaks, please.
test no global leaks, please.
.gitignore removed the dep on has-color.
256_color I have some basic strings getting colored! yay!
LICENSE
README.md update to documentation
calor.js fixing some things: make the 'type' param to the color constructor ac…
color_table I have some basic strings getting colored! yay!
package.json version -f

README.md

calor

a simple terminal text colorizer. simple simple simple. simple.

Usage

var calor = require('calor'),
red = calor.text(6,0,0),
gry = calor.text.grey(16)

console.log(calor.text.RED('hello'))
console.log(red('redde'))
console.log(calor.background.BLUE('bllluuu'))
console.log(gry("I'm grey!"))

Calor tries to provide an 8-bit RGB color constructor. Since the terminal color standard is kinda wierd, the colors that are possible are not quite logical and don't fit in an 8-bit representation.

If 0-7 maps to 00, 5f, 87, af, d7, df, ff respectively, the possible colors are:

xterm color chart

See? It's weird.

bugs and contrubution

I probably missed a color somehow or I may not be reseting the string effect appropriatly in all cases. If you find a bug, please submit a ticket

Something went wrong with that request. Please try again.