Making your "render" method non-blocking would solve your biggest problem. In your ISR, you could set a global volatile variable to indicate color change and since render no longer blocks, you could adjust color accoringly to that variable.
Making your "render" method non-blocking would solve your biggest problem. In your ISR, you could set a global volatile variable to indicate color change and since render no longer blocks, you could adjust color accoringly to that variable.