colorout

2.1.1 • Public • Published

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
 

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i colorout

    Weekly Downloads

    2

    Version

    2.1.1

    License

    MIT

    Unpacked Size

    6.68 kB

    Total Files

    8

    Last publish

    Collaborators

    • lionroar