So yes, it is possible. Not directly but via msg.ui_control
[{"id":"1e679465.35c78c","type":"ui_button","z":"9038de34.04db3","name":"","group":"110f893b.a0f1d7","order":0,"width":0,"height":0,"passthru":false,"label":"home button","tooltip":"","color":"","bgcolor":"","icon":"{{msg.icon}}","payload":"","payloadType":"str","topic":"","x":450,"y":220,"wires":[[]]},{"id":"4a88b538.b3406c","type":"inject","z":"9038de34.04db3","name":"red icon","props":[{"p":"ui_control.icon","v":"fa-home fa-2x coloredIcon red","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":260,"y":200,"wires":[["1e679465.35c78c"]]},{"id":"b0887b83.fa5e78","type":"ui_template","z":"9038de34.04db3","group":"110f893b.a0f1d7","name":"","order":1,"width":0,"height":0,"format":"<style>\n .coloredIcon.red{\n color :red;\n }\n .coloredIcon.blue{\n color :blue;\n }\n</style>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":440,"y":160,"wires":[[]]},{"id":"42a32029.aade","type":"inject","z":"9038de34.04db3","name":"blue icon","props":[{"p":"ui_control.icon","v":"fa-home fa-2x coloredIcon blue","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":260,"y":260,"wires":[["1e679465.35c78c"]]},{"id":"110f893b.a0f1d7","type":"ui_group","name":"Default","tab":"7179c13.0628d4","order":13,"disp":true,"width":"6","collapse":false},{"id":"7179c13.0628d4","type":"ui_tab","name":"Dashboard","icon":"dashboard","order":1,"disabled":false,"hidden":false}]