koriwi / cordlr-color

Given hex/rgb/hsl/etc. color codes, message a PNG image of them

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cordlr-color NPM version

Given hex/rgb/hsl/etc. color codes, message a PNG image of them

It supports anything SVG's fill would.

Installation

$ npm install --save cordlr-color

Usage

color <...codes> [--background <code>]

Example:

color #FFF
color #0F0F00 'rgba(0, 244, 100, 0.5)'
color 'rgba(0,0,0,0.8)' --background=red

Config

{
  "color": {
    "background": "#FFF", // default background color
    "max": 6, // The most colors someone can input
    "tmpdir": <dynamic>, // The place to store SVG and PNG files, defaults to your OS's tmpdir
  }
}

Allowing infinite colors:

"max": "Infinity"

Using a transparent default background:

"background": "rgba(255, 0, 0, 0.2)"

License

MIT © Jamen Marz

About

Given hex/rgb/hsl/etc. color codes, message a PNG image of them

License:MIT License


Languages

Language:JavaScript 100.0%