1.0.0 • Published 9 years ago
colorista v1.0.0

Colorista · 
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 coloristaAfter 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:
whiteblackredgreenblueyellowmagentacyangraybright whitebright redbright greenbright bluebright yellowbright magentabright cyan
As well as following styles:
bfor boldifor italicufor underlinedfor dimsfor strikethroughcfor concealnfor inverse/negative
1.0.0
9 years ago