In my 2D game I have TileSet class that loads the texture and creates Rectangle[] array which stores each tile coordinates. Pretty basic stuff. Now I'd like to also calculate and store the average color of each tile. How do I do that in XNA/C#?
My goal is to tint the tile with the color based on its value when highlighted. Or maybe there is some other way to achieve similar effect?
Texture2D.getData(...)
? \$\endgroup\$