hsv2rgb
convert from hsv/hsb to rgb
install
npm install hsv2rgb
use
var hsv = ; // using a pre-allocated arrayvar rgb = 0 0 0 1;console // [ 255, 0, 255, 1] // or withoutconsole // [ 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)