JSPM

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

color functions for node and browser

Package Exports

  • color-functions
  • color-functions/lib/css-color
  • color-functions/lib/hex2rgb
  • color-functions/lib/hsv2hex
  • color-functions/lib/hsv2rgb
  • color-functions/lib/rgb2hex
  • color-functions/lib/rgb2hsv
  • color-functions/lib/rgba
  • color-functions/lib/rgba2hex

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 (color-functions) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

color-functions

Build Status codecov.io

color functions for node and browser (browserify)

Installation

npm install color-functions --save

Usage

// import all functions
var cf = require('color-functions');
var hex2rgb = cf.hex2rgb;

// import single function
// (to reduce bundle script size with browserify or webpack)
var hex2rgb = require('color-functions/lib/hex2rgb');
var cssColor = require('color-functions/lib/css-color');

Available functions

  • hex2rgb
  • hsv2hex
  • hsv2rgb
  • rgb2hex
  • rgb2hsv
  • rgba
  • hsl2hsv
  • hsv2hsl
  • hsl2rgb
  • cssColor: parse a valid css color value to rgba format

License

MIT