toggleValue method

void toggleValue(
  1. String name
)

Implementation

void toggleValue(String name){
  int index = colors.indexOf(name);
  if(index == -1) return;
  status[index] = !status[index];
}