Socket
Socket
Sign inDemoInstall

color-tf

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    color-tf

RGB, HSL, HSV, HWB and more color models convertors


Version published
Maintainers
1
Install size
24.5 kB
Created

Readme

Source

Color transforms between RGB, HSL, HSV and HWB, and more

npm version build status coverage status

sources:

naming convention:

  • foo2bar: input and output are in [0, 1]
  • fooToBar: natural ranges: hues in [0, 360[, r/g/b in [0, 255], saturation/value/lightness in [0, 100]

The default export is a proxy, there are also direct functions available

Usage

import colorTf from 'color-tf';
import hsl2hsv from 'color-tf/hsl2hsv';

colorTf.hslToRgb(200, 95, 62); // [ 66, 189, 250 ]
console.assert(hsl2hsv === colorTf.hsl2hsv);

Keywords

FAQs

Last updated on 18 May 2018

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