Here you can see the script that will get the rgb value from the component inside the project and pubblish its value like a JSON throught the topic. var data = JSON.parse(payload); var color = { "mode":"color", "red":data.r, "green":data.g, "blue":data.b }; return JSON.stringify(color);