mattscotney
Programmer
Hi all,
I can get the hue, saturation and brightness of a color using the following code:
hue = Color.FromArgb(r, g, b).GetHue()
sat = Color.FromArgb(r, g, b).GetSaturation()
bri = Color.FromArgb(r, g, b).GetBrightness()
But how do I convert the hue, saturation and brightness levels back to RGB?
Code would be great, although the mathematical formulas or even just an algorithm and I should be able to work it out.
Thanks in advance,
Matt
I can get the hue, saturation and brightness of a color using the following code:
hue = Color.FromArgb(r, g, b).GetHue()
sat = Color.FromArgb(r, g, b).GetSaturation()
bri = Color.FromArgb(r, g, b).GetBrightness()
But how do I convert the hue, saturation and brightness levels back to RGB?
Code would be great, although the mathematical formulas or even just an algorithm and I should be able to work it out.
Thanks in advance,
Matt