Every second creating an object and I need to change the color of every next object by rainbow. I know how to change one`s color object, but I need an algorithm to do that right
I think its not good to handy make each color code every time
Color32 color = new Color(0.5f, 1f, 0.5f, 1f); // good
but I need for example 1st object 255,190,0, next 230,255,10, I mean color circle repeating. What should I do?

In order to have the colors enumerated in a "rainbowish" sequence, you would need to cycle the hue in the HVS color model and convert to the RGB model to initialize the new object. Both models as well as the conversion are described in this Wikipedia article.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With