1.0.0 • Published 10 years ago

glsl-hsv2rgb v1.0.0

Weekly downloads
18
License
-
Repository
github
Last release
10 years ago

glsl-hsv2rgb stable

Fast conversion from HSV color to RGB – published to npm for use with glslify, originally sourced from this post written by Sam Hocevar.

Usage

glsl-hsv2rgb

vec3 rgb = hsv2rgb(vec3 hsv)

Takes a vec3 where:

  • hsv.x is the hue.
  • hsv.y is the saturation.
  • hsv.z is the value.

All of the values should range between 0 and 1. Returns the calculated RGB value as a vec3.