CY8CKIT-046 has onboard RGB LED and your code seems no problem, but your pin assignment is wrong.
In CY8CKIT-046 kit, RGB LED is connected with P5.2(R), P5.3(G) and P5.4(B). You can also find the schematic in kit guide page 55.
Please change the pin assignment and re-test.
Thank you, Brandon! That had me stuck - all good now.