Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

colorista

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

colorista

Terminal colouring tool

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Logo of the project

Colorista · PRs Welcome

Terminal logging, benchmarking or simple debugging needs a colouring tool for aesthetic and readable purpose. We are presenting the supreme colouring tool that is easy to use in your code. It provides convenient syntax with the use of templated strings in JavaScript.

Installing & Getting started

Use NPM to install Colorista locally in your project, or globally in your system.

$ npm install colorista
$ npm install --global colorista

After installation you can require Colorista and start colouring your terminal output.

const colorista = require('colorista');

// Hello, World!
const helloWorld = colorista`${'Hello, World!'}`([
  { fg: 'black', bg: 'white', modifiers: ['b'] }
]);
console.log(helloWorld);

// Server log
const clientIP = '192.168.1.1';
const log = colorista`Сlient at ${clientIP} ${'connected'} to the server at ${new Date().toUTCString()}`([
  { fg: 'red', bg: 'white', modifiers: ['b'] },
  { fg: 'green', modifiers: ['b', 'i'] },
  { fg: 'cyan', modifiers: ['b', 'u'] }
]);
console.log(log);

Colorista supports the following foreground and background colours:

  • white
  • black
  • red
  • green
  • blue
  • yellow
  • magenta
  • cyan
  • gray
  • bright white
  • bright red
  • bright green
  • bright blue
  • bright yellow
  • bright magenta
  • bright cyan

As well as following styles:

  • b for bold
  • i for italic
  • u for underline
  • d for dim
  • s for strikethrough
  • c for conceal
  • n for inverse/negative

Keywords

FAQs

Package last updated on 18 Jul 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc