New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

colors2

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

colors2

Get colors in your node.js console like what

2.0.1-1
latest
Source
npm
Version published
Maintainers
1
Created
Source
  • A fork to keep and maintain the colors.js project as it seems original colors.js maintainer @Marak (Marak Squires), has decided to move on from node.js ecosystem.

Build Status

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) ded (Dustin Diaz) JustinCampbell (Justin Campbell) Alexis Sellier (cloudhead) mmalecki (Maciej Małecki) nicoreed (Nico Reed) morganrallen (Morgan Allen)

Keywords

ansi

FAQs

Package last updated on 24 Nov 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts