Hi,
Here is the code:
[{"id":"2a4d2487.8ff5fc","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"2ce4f9d.110a806","type":"ui_colour_picker","z":"2a4d2487.8ff5fc","name":"","label":"RGB FL1","group":"9bc5e3b7.87534","format":"rgb","outformat":"object","showSwatch":true,"showPicker":true,"showValue":true,"showHue":false,"showAlpha":false,"showLightness":true,"square":"false","dynOutput":"false","order":4,"width":5,"height":4,"passthru":true,"topic":"","x":160,"y":60,"wires":[["9a7c363e.a2d378"]]},{"id":"87b9b146.0f349","type":"function","z":"2a4d2487.8ff5fc","name":"","func":"var text = msg.payload\nvar len = text.length;\nvar cut = len-3\nvar nw = msg.payload.substring(0,cut)\nmsg.payload=nw\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":400,"y":160,"wires":[["604101cb.0d3a1","c7389bcc.e8a318"]]},{"id":"604101cb.0d3a1","type":"function","z":"2a4d2487.8ff5fc","name":"","func":"var ar =msg.payload.split(',').map(ar => parseInt(ar,10));\nmsg.payload=ar\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":400,"y":220,"wires":[["6bcc7318.fd946c","22de8182.428a8e"]]},{"id":"6bcc7318.fd946c","type":"api-call-service","z":"2a4d2487.8ff5fc","name":"LIGHT BED","server":"5215b5bc.f7c15c","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.bed","data":"{\"rgb_color\":{{payload}}}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":410,"y":300,"wires":[["89a03704.d0dfd8"]]},{"id":"89a03704.d0dfd8","type":"debug","z":"2a4d2487.8ff5fc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":610,"y":300,"wires":[]},{"id":"22de8182.428a8e","type":"debug","z":"2a4d2487.8ff5fc","name":"F2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":590,"y":220,"wires":[]},{"id":"c7389bcc.e8a318","type":"debug","z":"2a4d2487.8ff5fc","name":"F1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":590,"y":160,"wires":[]},{"id":"fbc58201.db4c8","type":"debug","z":"2a4d2487.8ff5fc","name":"RGB out","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":600,"y":100,"wires":[]},{"id":"9a7c363e.a2d378","type":"csv","z":"2a4d2487.8ff5fc","name":"","sep":",","hdrin":"","hdrout":"","multi":"one","ret":"\\n","temp":"r,g,b,a","skip":"0","strings":true,"include_empty_strings":false,"include_null_values":false,"x":310,"y":100,"wires":[["87b9b146.0f349","fbc58201.db4c8"]]},{"id":"9bc5e3b7.87534","type":"ui_group","z":"","name":"HOME","tab":"57c688f9.3fc498","order":1,"disp":true,"width":"6","collapse":false},{"id":"5215b5bc.f7c15c","type":"server","z":"","name":"Home Assistant","addon":true},{"id":"57c688f9.3fc498","type":"ui_tab","z":"","name":"RED Home","icon":"RED dashboard","disabled":false,"hidden":false}]