HSV to RGB OpenSCAD Library
by thingiverse, published
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:
We've also included this in Customizer! Include it in your customizers by typing:
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
Liked ByView All
Give a Shout Out
HSV to RGB OpenSCAD Library by thingiverse is licensed under the Creative Commons - Attribution - Share Alike license.
What does this mean?
- You must attribute (give credit) to the creator of this Thing.
- You must distribute Remixes under the same license as the original.
- Remixing or Changing this Thing is allowed.
- Commercial use is allowed.
Show Some Love
Say thanks by giving thingiverse a tip and help them continue to share amazing Things with the Thingiverse community.Tip Designer
We're sure thingiverse would love to see what you've printed. Please document your print and share a Make with the community.
To post a Make simply visit this Thing again and click I Made One to start uploading your photo. It’s even easier to post a Make via the Thingiverse Mobile app (available via Google Play and Apple App Store).