colours for node served with hot coffee
gives your console output light and bg colours, zebra, zalgo. and rainbow.
this library should be good as it is and not outdate, due to its limited purpose. even if i won't work on it anymore, it should save to be used and rare updates should be considered as a sign of quality.
easy. just use strings like this
require 'culoare'consolelog 'coloured string'lightredboldunderline
culoare also supports great nesting of colours. this code
consolelog "green text text in differentnested that in green"green
would result in something like
you can define themes and pass strings or arrays of strings
colors = require 'culoare'colorssetThemesilly: 'rainbow'input: 'grey''bold'warn: 'yellow''bold''underline'
console.log 'this is a warning'.warn would provide you with a
yellow, underlined and bold warning text.
see the example.coffee for more examples.
basically i cloned colors.js from Marak/cloudhead and just stripped some code like the browser mode - who would want to use that? - and the string prototype blacklist, since i am not the programmer's nanny :-) also the functionality that would let you do colors.red("my colorstring") did not match my taste.
i then ported all the cool stuff to the coolest language ever and added some more colours. i don't know what or who zalgo is and what it is good for, so the only logical consequence was to just leave it in place (and i'm not actually sure if i did the porting of zalgo right).
there's an additional feature called .light that will convert the colours to their lighter counterpart.
usage is pretty similar to colors.js except that you can't use colors directly via something like colors.red("...")
if there's something you miss i might add it.
so thanks to Marak for the cool stuff and to Jeremy for the cool language and thanks to all the other guys that worked on colors.js