Coder Social home page Coder Social logo

colors.js's Introduction

colors.js - get color and style in your node.js console ( and browser ) like what

Installation

npm install colors

colors and styles!

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

Usage

var colors = require('colors');

console.log('hello'.green); // outputs green text
console.log('i like cake and pies'.underline.red) // outputs red underlined text
console.log('inverse the color'.inverse); // inverses the color
console.log('OMG Rainbows!'.rainbow); // rainbow (ignores spaces)

Creating Custom themes

var colors = require('colors');

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

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

Marak Squires , Justin Campbell, Dustin Diaz (@ded)

colors.js's People

Contributors

marak avatar mmalecki avatar justincampbell avatar morganrallen avatar cjc avatar hashar avatar ded avatar jamescostian avatar buschtoens avatar stelcheck avatar smtlaissezfaire avatar jakub-g avatar zofrex avatar

Stargazers

Evgeny avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.