I have built this bit of code which sets the icon colour when a message is received.
But it is limited to a couple of colours defined by the nr-dashboard-xxxx
I am wanting to send it different colours.
Either with the RGB values or the name would suffice - for now, as red, green, blue, yellow, black, white would suffice for what I am doing at this point.
The code was from a "bubble" example flow I found somewhere, and so I extrapolated to this:
[{"id":"b91a0c51.d3aa3","type":"inject","z":"c163e61e.77c488","name":"","topic":"","payload":"Off-line","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":560,"y":80,"wires":[["2b7e22cf.6a9ef6"]]},{"id":"32adbc35.951a94","type":"inject","z":"c163e61e.77c488","name":"","topic":"","payload":"On-line","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":560,"y":120,"wires":[["2b7e22cf.6a9ef6"]]},{"id":"2b7e22cf.6a9ef6","type":"function","z":"c163e61e.77c488","name":"","func":"if (msg.payload == \"On-line\")\n{\n //\n msg = {payload: '<i class=\"fa fa-bullseye fa-2x nr-dashboard-ok\"></i>'};\n} else\n{\n //\n msg = {payload: '\"<i class=\"fa fa-bullseye fa-2x nr-dashboard-error\"></i>\"'};\n}\nreturn msg;","outputs":1,"noerr":0,"x":720,"y":90,"wires":[["25eb86c5.122112","1444d956.ad82d7"]]},{"id":"25eb86c5.122112","type":"ui_text","z":"c163e61e.77c488","group":"41f32a2e.a0347c","order":15,"width":"1","height":"1","name":"default","label":"","format":"{{msg.payload}}","layout":"row-center","x":850,"y":110,"wires":[]},{"id":"41f32a2e.a0347c","type":"ui_group","z":"","name":"Vieweryuyuyuyu","tab":"ede494d4.49ddb","order":1,"disp":true,"width":"12","collapse":false},{"id":"ede494d4.49ddb","type":"ui_tab","z":"","name":"Messages","icon":"dashboard","order":2}]