Skip to content

nooitaf/meteor-colors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Colors.js for Meteor

Meteor Server Only wrapper for Colors.js

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