https://github.com/hughsk/glsl-hsv2rgb
Fast GLSL conversion from HSV color to RGB
https://github.com/hughsk/glsl-hsv2rgb
Last synced: 3 months ago
JSON representation
Fast GLSL conversion from HSV color to RGB
- Host: GitHub
- URL: https://github.com/hughsk/glsl-hsv2rgb
- Owner: hughsk
- Created: 2014-05-01T15:57:35.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-05-01T15:57:41.000Z (about 11 years ago)
- Last Synced: 2025-03-16T20:35:08.005Z (3 months ago)
- Language: C
- Size: 105 KB
- Stars: 26
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# glsl-hsv2rgb [](http://github.com/badges/stability-badges)
Fast conversion from HSV color to RGB – published to npm for use with
[glslify](http://github.com/chrisdickinson/glslify), originally sourced from
[this post](http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl) written
by [Sam Hocevar](http://sam.zoy.org/).## Usage ##
[](http://npmjs.org/package/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`.