Trying to turn off fading RGB LED after 30 secs
Here is a little snippet of logic that you can implement in your code :

if(millis() - getOutOfSleepTime &gt;= 30000) {
    activateSleepMode();
    while(!buttonPress);
    getOutOfSleepMode();
    getOutOfSleepTime = millis();
}

if(buttonPress)
    activateSleepMode();