Control rgb led with timer pwm (RTL8720DF)

Hi everyone!
I’m trying control rgb led ws2812C using timer pw. I referenced mbed pwm example in …\realtek_amebaD_va0_example\example_sources\TIMER\mbed\pwm\src but this example just support generate pwm with us pulsewith and rgb led can only be controled by ns pulsewith pwm with constantly changing duty cycle. Can you recommend any method to control led rgb?

You can refer here WS2812B – Basics – Realtek IoT/Wi-Fi MCU Solutions