How to use HSB color space in scripting instead of RGB?

I would want to use HSB for `RenderSettings.ambientLighting`. Just want to change hue slowly over time to get psychedelic effect. People mention about HSB, but I google it and can't find scripts about it, same with scripting reference.

Thanks.

Update: JavaScript please

I strongly recommend you add this as a feature request to http://feedback.unity3d.com

Okay, I will, looks like a good feature to add.

Are you resetting the variable somewhere else? Also, I doubt this is needed but you could create a local variable before reassigning the "Exp" variable to hold the current Exp amount and then use that instead of PlayerPrefs.GetInt("Exp"). Though again I doubt it's needed.

1 Answer

1

Use this script on the wiki.

Wow, is there a JavaScript version somewhere? Sorry I forgot to mention this in main question.

There doesn't need to be a Javascript version in order to use it in Javascript. It works fine as-is; just follow the directions on the wiki. Also a Javascript version would have to use a class rather than a struct, which isn't really desirable in this case.

Alrighty then. I'll try to figure out. I hoped it's a bit simpler.