Alternatively, there is a RGB.onChange() function that will call your own handler each time the LED is updated. This allows you to then set external PWM signals to match the RGB values given.
https://docs.particle.io/reference/firmware/photon/#onchange-handler-
The RGB values echo exactly the color that is shown on the onboard LED, whether that’s set by the system or the user.