Have ideas to improve npm?Join in the discussion! »

    color-mapper

    0.0.4 • Public • Published

    color-mapper

    install

    With npm:

    npm install color-mapper

    Usage

    var createLinearGradient = require('../index')
     
    var gradient = createLinearGradient(0, 255);
     
    gradient.addColorStop(1.0, '#1ec38e');
    gradient.addColorStop(0.2, '#fed741');
    gradient.addColorStop(0.15, '#fea429');
    gradient.addColorStop(0.1, '#ef6b2f');
    gradient.addColorStop(0.05, '#dc3b2a');
    gradient.addColorStop(0.0, '#901334');
     
    console.log(gradient.getHex(24));
    console.log(gradient.getHex(255));
    console.log(gradient.getHex(0));
    console.log(gradient.getHex(26));

    Install

    npm i color-mapper

    DownloadsWeekly Downloads

    39

    Version

    0.0.4

    License

    MIT

    Unpacked Size

    5.8 kB

    Total Files

    8

    Last publish

    Collaborators

    • avatar