Add code for red an green also. “renderer.material.color.b = slider;” only change the blue color.
Or better yet add 2 new sliders that control red and green.
I guess you have no idea what a color is
A color is an object with 3 or 4 values that actually influence the color you see.
color.r = the quanty of red in your color
color.g = the quantity of green in your color
color.b = the quantity of blue in your color
color.a = the transparence of your color, a stands for alpha
So change the
renderer.material.color.b in renderer.material.color.r and renderer.material.color.g in two of the sliders
Thanks so much!!! And i have one more question. I have scene1 with cube and this sliders and button play, when you press play it load scene2 with the same cube, and i need the colors of the scene1 loaded in scene2. Can you still help me with this?