🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

hsv2rgb

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hsv2rgb

convert from hsv/hsb to rgb

1.1.0
latest
Source
npm
Version published
Maintainers
1
Created
Source

hsv2rgb

convert from hsv/hsb to rgb

install

npm install hsv2rgb

use

var hsv = require('hsv2rgb');

// using a pre-allocated array
var rgb = [0, 0, 0, 1];
hsv(300, 1, 1.0, rgb)
console.log(rgb) // [ 255, 0, 255, 1]

// or without
console.log(hsv(300, 1, 1.0)) // [ 255, 0, 255 ]

api signature

hsv(hue, saturation, value [, out])

  • hue wrapping 0-359 degrees (e.g. 390 becomes 30)
  • saturation clamped to 0.0 to 1.0 (percentage)
  • valu clamped 0.0 to 1.0 (percentage)
  • out is an optional 3+ component array (hsv2rgb will only update the first 3 items)

license

MIT

Keywords

rgb

FAQs

Package last updated on 18 Apr 2015

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