I'm not a Java programmer, but I'll try to help you anyway.
If I understand correctly, you want to change the color of "Color rainbow"?
Well, I think you just can issue
Color rainbow = new Color(red,green,blue);
again, just with other values for red,green and blue.
Edit: if Color is a type, I think you can leave it away, as the var is already declared.