So i want to make a function where you put in a color (like White, Red, Aquamarine, etc) and it sets the color of the rectangle to the color you have putten in. What is the best way to do this?
I got this:
public void setVisible(GraphicsDevice gd ,SpriteBatch sb, object c) {
rec = new Rectangle(ButtonXPosition,ButtonYPosition,ButtonWidthSize,ButtonHeightSize);
Texture2D pixel = new Texture2D(gd, ButtonWidthSize,ButtonHeightSize);
sb.Draw(pixel,rec,Color.c);
}