Blinking RGB LED strip w/ button

I am very new to coding and am trying to write a code to control a RGB LED strip. I want the strip to act as a metronome and blink green when I am holding down the button and blink red once when I let off the button and then turn off. I found that I cannot use delay() (line 31 of code) with a long time interval in order to turn off the LEDs because it doesn't allow me to re-start the cycle when I press the button again. What should I use instead?

Thanks in advance!

Paddle_LED.ino (1014 Bytes)

Use Blink without Delay instead. Then you can read the button while the lights time out or whatever they do.