Can you set color of HSB?
BaDDApple
Member Posts: 49
Hello,
Currently I'm randomly changing the RGB values to change the environement colors of my game. It's works great, but there are times I get a color that is too dark. I thought I could use Hue, Satuation and Brightness. I then could control it not getting to dark. I might be missing it, but I can't find a variable to set HSB only RGB. Any help would be appreciated.
Thanks
Comments
You can limit the range of the random selection so as to avoid overly dark colours.
For example, this will give you the full gamut of a 24bit colour palette . . .
R = random (0,255)/255
G = random (0,255)/255
B = random (0,255)/255
Whereas this will limit the lower values so that the very darkest colour is a mid/dark grey . . .
R = random (50,255)/255
G = random (50,255)/255
B = random (50,255)/255
In the colour sector on the Mac version you can select colours using HSB if you want, not sure how this works on the PC version, you can of course covert RGB colours to HSB (and HSB to RGB) values if you need to.
@Socks. That worked great. Sometimes the easy ways are just stareing you in the face. Thanks for pointing it out to me. Much appreciated.