2.1.1 • Published 4 years ago

colorout v2.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

colorout.js

simple Nodejs library to log colorful messages to the console. supports 16-colors.

usage

//require
const colorout = require('colorout');
//require COLOR AND TYPE CONSTANTS
const {TYPE , COLOR } = colorout;

/**
 *
 * @param { COLOR.[NAME] } foregroundColor?  //constant
 * @param { COLOR.[NAME] } backgroundColor? //constant
 * @param { TYPE.[NAME] } fontType? //constant
 **/
//colorout(foregroundColor ,backgroundColor ,fontType);

const green = colorout(COLOR.green , COLOR.white, TYPE.bold);
const error = colorout(COLOR.red);
const blue = colorout(COLOR.blue);

green.log('I love green!');
error.log('This is an error message')

//*new* or mix colors

green.log('green is the new ',blue.inline('blue'));

Font TYPE CONSTANTS

    .normal
    .bold
    .dim
    .underline
    .inverted
    .hidden

foreground/background COLOR Constants

16 colors

The prefix b before the color name stands for bright

    .default
    .black
    .red
    .green
    .yellow
    .blue
    .magenta
    .cyan
    .white
    .bBlack
    .bRed
    .bGreen
    .bYellow
    .bBlue
    .bMagenta
    .bCyan
    .bWhite