Controlling RGB LED with two buttons.

Coding the colors is simple and i have figured it out. At this point, i am unsure of what type of function to use to switch between the colors. Something along these lines maybe...?

const int redledPin = 11;
const int greenledPin = 10;
const int blueledPin = 9;
const int buttonPin1 = 2;
const int buttonPin2 = 3;


void setup ()
{
  pinMode (redledPin, OUTPUT);
  pinMode (greenledPin, OUTPUT);
  pinMode (blueledPin, OUTPUT);
  pinMode (buttonPin1, INPUT);
  pinMode (buttonPin2, INPUT);
}
    
analogWrite(redledPin, 250);
analogWrite(blueledPin, 250);
analogWrite(greenledPin, 0);

if (digitalRead(buttonPin1)==LOW) { (switch to purple) }
if (digitalRead(buttonPin2)==LOW) { (switch to red) }

etc.

I feel like the solution is really simple and im just not familiar enough with the arduino programming to utilize the correct functions.