Pulsing RGB-LED. Understanding OCM and Phase Correct PWM

Thank you!

Looking at the code snippet I provided, am I using it correctly? It feels inefficient to me.