RGB code with Touchosc

It changes the colour of the LED but not to red, green or blu

Are you saying you see colours, but never pure primaries?

What does your debug output tell you is going on?