As best I can tell the ColorControl's wheel has been replaced by the rectangular widget.

There are no built-in functions to convert HSV to RGB and back, but it's pretty easy to find some on the web:

And here are HSL-RGB conversions from my own scriptlib:

Code: Select all

```
function rgbToHsl(red, green, blue, alpha)
local max = math.max(red, green, blue)
local min = math.min(red, green, blue)
local h,s,l
l = (max + min) / 2
if max == min then
h = 0
s = 0
else
local delta = max - min
if l > 0.5 then s = delta / (2 - max - min) else s = delta / (max + min) end
if max == red then
h = (green - blue) / delta
if green < blue then h = h + 6 end
elseif max == green then
h = (blue - red) / delta + 2
else
h = (red - green) / delta + 4
end
h = h / 6
end
return h, s, l, a or 1
end -- End of rgbToHsl()
function hslToRgb(hue, saturation, lightness, alpha)
local r, g, b
if saturation == 0 then
r = 1
g = 1
b = 1
else
function hue2rgb(p, q, t)
if t < 0 then t = t + 1 end
if t > 1 then t = t - 1 end
if t < 1/6 then return p + (q - p) * 6 * t end
if t < 1/2 then return q end
if t < 2/3 then return p + (q - p) * (2/3 - t) * 6 end
return p
end
local q
if lightness < 0.5 then q = lightness * (1 + saturation) else q = lightness + saturation - lightness * saturation end
local p = 2 * lightness - q
r = hue2rgb(p, q, hue + 1/3)
g = hue2rgb(p, q, hue)
b = hue2rgb(p, q, hue - 1/3)
end
return r, g, b, a or 1
end -- end of hslToRgb()
```

edit: Wow; I had no idea that would automatically embed. Sorry about the sudden bright light!