HSV to RGB OpenSCAD Library

by thingiverse, published

HSV to RGB OpenSCAD Library by thingiverse Mar 27, 2014


Liked By

View All

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.

Print Thing Tag

Thing Statistics

3014Views 1085Downloads


This is a small utility to convert hue-saturation-value colors into RGB colors for use with OpenSCAD's color() module.

Check out the instructions tab to see more detail.

[Edit: fixed a bug where hue was actually being set by 0-360 not 0.0 - 1.0]


To use it in your own project, download the .scad and put it in your openscad library folder or in the same folder as the project you are using it in. Then, at the top of your script just type:

use <hsvtorgb.scad>

We've also included this in Customizer! Include it in your customizers by typing:

use <utils/hsvtorgb.scad>

the useful function in this lib is:

function hsvToRGB(h, s, v, a)
give this function a hue, saturation, value, and alpha between 0.0 and 1.0 and it will return a vector with RGBA values in [r, g, b, a] format with values between 0.0 and 1.0

All Apps

Upgrade this Thing with Thingiverse Apps

No results.

Potato. There are no commentz here.