I was recently trying to make a light "guess the color" game (my first one), where you get a hex code and you get some alternative to choose from. The way I've done it I need to collect information about these alternatives (which are just colored ovals). Anyway, I need to change the RGB values of a color since they are randomly generated, and it doesn't seem very efficient to create (10 in this case) separate colors and set them one at a time.
My problem is, I can not find a way to change the RGB values of my colors. Basically I created a color array (I noticed this problem exists without the array aswell) but trying to change values as you would with a normal variable doesn't work. It just gives me an error.
This is the specific method.
public void OvalData(int r, int b, int g, int x, int i){
//Create two arrays containing the information
Color OvalColor[] = new Color[difficulty];
int[] posX = new int[difficulty];
//Set the infromation
Color[i] = (r, g, b);
posX[i] = x;
Where this is the problem line:
`Color[i] = (r, g, b);`
Any help would be appreciated!