JSPM

color-away

0.0.4
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 2
    • Score
      100M100P100Q38192F
    • License GPL-3.0

    Change your normal console.log command into any color, background, or font style you desire. Default function changes the style of your terminal text.

    Package Exports

    • color-away

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (color-away) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Install/Documentation

    $ npm install color-away --save

    Usage

    var ca = require("color-away")
    
    // Console log your style of choice.
    // Format:
    
    ca.log([FORMAT #], [BACKGROUND # ], [COLOR #], "message");
    ca.log([1], [2], [3], "This message will send");
    [1] = Bold, [2] = Red, [3] Green
    
    // If you simply want only a color text, without background, or format EX:
    ca.log([FORMAT 0], [BACKGROUND 0], COLOR #, "message");
    [0] = none
    

    Library / Color Reference

    Background : Numbers
    
    Nothing [0]
    Black [1]
    Red [2]
    Green [3]
    Yellow [4]
    Blue [5]
    Magenta [6]
    Cyan [7]
    Light Grey [8]
    Dark Grey [9]
    Light Red [10]
    Light Green [11]
    Light Yellow [12]
    Light Blue [13]
    Light Magenta [14]
    Light Cyan [15]
    White [16]
    
    Font Color : Numbers
    
    Nothing [0]
    Black [1]
    Red [2]
    Green [3]
    Yellow [4]
    Blue [5]
    Magenta [6]
    Cyan [7]
    Light Grey [8]
    Dark Grey [9]
    Light Red [10]
    Light Green [11]
    Light Yellow [12]
    Light Blue [13]
    Light Magenta [14]
    Light Cyan [15]
    White [16]
    
    Format : Numbers
    
    Nothing [0]
    Bold [1]
    Dim [21]
    Underlined [3]
    Blink [4]
    Inverted [5]
    Hidden [6]