Socket
Socket
Sign inDemoInstall

color-functions

Package Overview
Dependencies
0
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    color-functions

color functions for node and browser


Version published
Weekly downloads
782
decreased by-10.32%
Maintainers
1
Install size
34.9 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 03 Apr 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc