@f/hsv-to-rgb
v1.0.0
Published
Convert an HSV color to RGB
Downloads
127
Readme
hsv-to-rgb
Convert an HSV color to RGB
Installation
$ npm install @f/hsv-to-rgb
Usage
var hsvToRgb = require('@f/hsv-to-rgb')
hsvToRgb(74, 0.19, 0.41) // -> [100, 105, 85]
API
hsvToRgb(hue, saturation, value)
hue
- Hue expressed as an integer between 0 and 360.saturation
- Saturation expressed as a floating point between 0 and 1.value
- Value (aka Brightness) expressed as a floating point between 0 and 1.
Returns: An array containing [red, green, blue]
values that correspond to the HSV color you specified.
License
MIT