Edited 6 years ago by Yugo
I would change the color of object with one slider.
It have to change the hue but I don't know how to do it ?
Thank's you in advance.
Gwendal
I would change the color of object with one slider.
It have to change the hue but I don't know how to do it ?
Thank's you in advance.
Gwendal
Hi @Yugo you are right, there is no easy way right now.
We'll probably have a solution in the next beta.
Hi @Yugo starting from the next beta you'll be able to use the following code in the Changed event of the Slider control (assuming that you have a Slider1 and a View1 with a predefined background color set from the Inspector):
// extract original color var color1 = View1.backgroundColor; // extract each component var h = value; var s = color1.saturation; var b = color1.brightness; var a = color1.alpha; // create and set the new color var color2 = Color.hsba(h,s,b,a); View1.backgroundColor = color2;
In the current beta the Color.hsba function is missed.