nooitaf:colors

Add colors to strings using Colors.js


Install
meteor add nooitaf:colors@=1.1.2_1

Documentation

Colors.js for Meteor

Meteor Server Only wrapper for Colors.js 1.1.2

Installation

meteor add nooitaf:colors

Usage

Enable or disable colorful output

colors.enabled = true // default

Output colors

// server
console.log('red'.red)
console.log('green'.green)
console.log('blue'.blue)
console.log('~~~~~~'.grey)
console.log('R'.red + 'G'.green + 'B'.blue)
console.log('~~~~~~'.grey)
var test = 'ALLTHECOLORS'
console.log(test.rainbow)

screenshot.jpg

Colors and styles!

  • bold
  • italic
  • underline
  • inverse
  • yellow
  • cyan
  • white
  • magenta
  • green
  • red
  • grey
  • blue
  • rainbow
  • zebra
  • random

Creating Custom themes

colors.setTheme({
  silly: 'rainbow',
  input: 'grey',
  verbose: 'cyan',
  prompt: 'grey',
  info: 'green',
  data: 'grey',
  help: 'cyan',
  warn: 'yellow',
  debug: 'blue',
  error: 'red'
});

// outputs red text
console.log("this is an error".error);

// outputs yellow text
console.log("this is a warning".warn);

Contributors

User Name
marak Marak Squires
cloudhead Alexis Sellier
mmalecki Maciej Małecki
nicoreed Nico Reed
morganrallen Morgan Allen
JustinCampbell Justin Campbell
ded Dustin Diaz