In current implementation, program always iterates through all LEDs.
Change this logic.
Iterate only when a button is pressed.
If the button is pressed, released, and pressed again continue from the previous active LED.
Example for the sequence: RRGGGB
Button released => nothing
Button pressed for a 3 sec => RRG
Button released => nothing
Button pressed for a 2 sec => GG
Button released => nothing
Button pressed for a 5 sec => BRRGG
In current implementation, program always iterates through all LEDs.
Change this logic.
Example for the sequence: RRGGGB
Button released => nothing
Button pressed for a 3 sec => RRG
Button released => nothing
Button pressed for a 2 sec => GG
Button released => nothing
Button pressed for a 5 sec => BRRGG