A javascript package that makes color logging easier. Based on Chalk!
To install AlterChrome with NPM use:
npm i alterchrome --save
Alternating background and font color in console output:
var alterchrome = require('alterchorme');
// assuming primary color is red and secondary is black
console.log(alterchrome.color("string here")); // logs string with red bg and black font
console.log(alterchrome.color("string here")); // logs string with black bg and red font
console.log(alterchrome.color("string here")); // logs string with red bg and black font
console.log(alterchrome.color("string here")); // logs string with black bg and red font
To change Primary color to green:
alterchrome.setPrimaryColor("green");
To change Secondary color to white:
alterchrome.setSecondaryColor("white");
- Use npm package
hardlog
with NodeJS, then read hardlogs withless
. - Use only for fast prototyping or mock projects,
alterchrome
is not intended for full-scale development yet.