Controlling RGB Leds from Live video feedback(Using processing)

You will need to get the data sent from the processing side sent within Packets , Data packets which will be sent to the Arduino serially, your current function will deal with it you have to read into a byte until you encounter COMMA and then read again also again till COMMA