The 2D mini game tutorial mention that I can change the color of any sprite in the “sprite renderer” component provided that it is gray. Could you elaborate about it? Any type of gray? Has to be gray? or the mean the material default color?
A Sprite is just an image. A SpriteRenderer displays that image in the scene, and can modify properties of it to influence how it looks. One of these properties is the color of the image.
When you adjust the color value of a SpriteRenderer, it tints the color of the Sprite. So if your image contains any red color, for instance, then the color red will always bleed into whatever other color you tint the image. You can never fully change the color to a pure blue, or a pure yellow, etc. Same goes for any other colors of your image.
This is where a gray-scale image differs. Because there are no defining color values in a gray-scale image, then when you adjust the color value of a SpriteRenderer, the Sprite can be tinted into any color. Brighter-grays give brighter colors, and darker-grays give darker colors.
Here’s an example using two similar images, the left one being shades of red, and the right one being shades of gray:
Here’s how it looks if I tint the red image in Unity, spinning around the color-wheel (the color-wheel didn’t show up in recording). Notice how there’s always a bit of red in every shade, and never a pure different color.
The darkest shade of red is practically black for most tinted colors, and the entire image becomes the same shade of red when tinted to pure red:
Now here’s how it looks if I tint the gray image in Unity, spinning around the color-wheel again.
Notice how the image can be tinted in any shade of any color, the lightest shade has the brightest color value, the darkest shade has the darkest color value, and there’s no bleeding of any other colors like in the above red image.