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.


Update: JavaScript please

Use this script on the wiki.