Nondigestible Purple Mayonnaise

    chroma

    0.0.1 • Public • Published

    Chroma - Simple terminal colors for Node.js

    Contents

    1. Install
    2. Introduction
    3. API
    4. License

    Install

    npm install kagami

    ##Introduction

    Chroma is a quick and easy way to print colors in Node.js terminal applications.

    console.log('My favorite colors are ' + chroma.blue('blue') + ' and ' + chroma.white('white') + '!');
     
    //My favorite colors are blue and white!

    Chroma supports the following ASCII colors:

    • Black
    • Red
    • Green
    • Yellow
    • Blue
    • Magenta
    • Cyan
    • White

    ##API
    ###chroma \[color\]() Returns the given text wrapped in the correct ASCII color.

    Usage:

    chroma [color]( text )

    console.log(chroma.blue('This will be blue!'));

    ###chroma() Returns a generator function that can be used to produce the ASCII color that is closest to the supplied value. Accepts Hex and RGB values!

    Usage:

    chroma ( hex string ) ** chroma ( red value, green value, blue value )**

    var blueifier = chroma('#00FFFF');
    var redifier = chroma(255, 12, 5);
     
    console.log(blueifier('This will be blue!'));
    console.log(redifier('This will probably be red!'));

    ##License

    Chroma is MIT licensed. You can read the license here.

    Keywords

    none

    Install

    npm i chroma

    DownloadsWeekly Downloads

    293

    Version

    0.0.1

    License

    none

    Last publish

    Collaborators

    • pachet