Nuclear Pumpkin Mocha

    color-formatter

    0.1.2 • Public • Published

    Color Converter

    Convert colors of different formats with ease

    Install

    npm install --save color-converter

    Usage

    const Color = require('color-converter');
     
    const rgb = '255, 68, 133';
    const hex = '#F8E100';
     
    Color.getType(rgb)
    // => 'rgb'
     
    Color.toRGB(hex)
    // => '248, 225, 0'
     
    // OR
     
    // Second argument of true means we want the output as an array
    Color.toRGB(hex, true);
    // => [248, 255, 0]
     
     
    // You can also convert to hex
    Color.toHex(rgb);
    // => #FF4485

    License

    MIT © Josh Ghent

    Install

    npm i color-formatter

    DownloadsWeekly Downloads

    0

    Version

    0.1.2

    License

    MIT

    Last publish

    Collaborators

    • joshghent