Controlling RGB LED with two buttons.

close, but not quite... try something like this:

if (digitalRead(buttonPin1)== LOW);
{
  color++; //increment color
  if (color >7) color = 0;
}
  
if (digitalRead(buttonPin2)== LOW);
{
  color--;  //decrement color
  if(color<0) color = 7;
}