You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

color-functions

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

color-functions

color functions for node and browser

3.0.1
latest
Source
npmnpm
Version published
Maintainers
1
Created
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

color

FAQs

Package last updated on 03 Apr 2019

Did you know?

Socket

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