This package has been deprecated

Author message:

color-functions is renamed to @swiftcarrot/color-fns

color-functions

3.0.1 • Public • Published

color-functions

npm npm Build Status codecov styled with prettier Greenkeeper badge

Color functions for node and browser (via browserify, webpack, ...)

Installation

npm install color-functions --save
# or 
yarn add color-functions

Usage

// commonjs
const { hex2rgb } = require('color-functions');
 
// es module
import { hex2rgb, cssColor } from 'color-functions';
import * as cf from 'color-functions';

Available functions

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

check test for more examples

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Published

Version History

  • Version
    Downloads (Last 7 Days)
    • Published

Package Sidebar

Install

npm i color-functions

Weekly Downloads

872

Version

3.0.1

License

MIT

Unpacked Size

34.9 kB

Total Files

20

Last publish

Collaborators

  • adjusted