@gness1804/color-converters

    2.1.4 • Public • Published

    @gness1804/color-converters

    A utility that provides simple color conversions from RGB to Hex and vice-versa. Can be used to quickly convert one to the other on the command line.


    Install

    npm install -g @gness1804/color-converters
    OR
    yarn global add @gness1804/color-converters
    

    Usage

    The color-converters package will give you access to two binaries: rgb-to-hex and hex-to-rgb. The names are pretty self-explanatory. The package is meant as a global module, used as follows:

    rgb-to-hex <command> [option]
    hex-to-rgb <command> [option]

    For conversions, you might do something like this:

    rgb-to-hex -r <red value> -g <green value> -b <blue value>
    
    rgb-to-hex -r 255 -g 0 -b 0
    # outputs "Success!  Your hex value is #ff0000"
    hex-to-rgb -h <hex value>
    hex-to-rgb -h "#fff"
    hex-to-rgb -h "#ffffff"
    # both output "Success!  Your RGB value is 255 255 255"

    All Commands and Options

    For rgb-to-hex:

    COMMANDS

      help  Print out help info.

    OPTIONS

    -d, --debug    Print debug info. Default: false
    -v, --version  Print CLI version. Default: false
    -r, --red      The value for red. 0 to 255. Default: false
    -g, --green    The value for green. 0 to 255. Default: false
    -b, --blue     The value for blue. 0 to 255. Default: false

    For hex-to-rgb:

    COMMANDS

      help  Print out help info.

    OPTIONS

     d, --debug    Print debug info. Default: false
    -v, --version  Print CLI version. Default: false
    -h, --hex      The hex value (3 or 6 characters) Default: false

    Changelog

    ❯ Read the changelog here →

    Install

    npm i @gness1804/color-converters

    DownloadsWeekly Downloads

    2

    Version

    2.1.4

    License

    MIT

    Unpacked Size

    17.6 kB

    Total Files

    15

    Last publish

    Collaborators

    • gness1804