- Home /
HSV Selector?
Hi, all!
I would like to create a function that takes an input float from 0.0f to 1.0f and returns a hue value for an HSV that has full saturation and full value.
Is there a way to do this? As far as I know in Unity, colors only work with RGBA.
My idea was a spectrum with 0.0/1.0 being straight up Red and the in between decimals accounting for the rest of the values.\
Your help is much appreciated! - YA
Answer by robertbu · May 24, 2014 at 08:13 PM
I believe they are in the range of 0.0 to 1.0. This is not the code I used the last time I had to solve this problem, and later bumped into this (better) code. A quick test would verify.
Your answer
Follow this Question
Related Questions
Changing Color Based on Z position 2 Answers
Material doesn't have a color property '_Color' 4 Answers
Get Inspector to display class as color field 2 Answers
HSV to RGB without EditorGUIUtility.HSVToRGB 3 Answers
Sprite Color.Lerp 0 Answers