JSPM

cordlr-color

0.1.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q29679F
  • License MIT

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

Package Exports

  • cordlr-color

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cordlr-color) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

cordlr-color NPM version

Given hex/rgb/hsl/etc. color codes, message an 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