glsl-hsv2rgb

Fast GLSL conversion from HSV color to RGB


Keywords
fast, hsv, hue, saturation, value, rgb, color, convert, glsl, shader, webgl, glslify
Install
npm install glsl-hsv2rgb@1.0.0

Documentation

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.