Ui_level font color

I want to change value font color according to the color of the segments, but it change also segments value colors.
How to do?

If I understand you correctly, you want the color of the value be dynamic so if value changes, it will change also the color if it belongs in other segments area?

If so, this is not anyhow supported.

I'm not having any plans to improve the widget by adding more features to it. This widget is maintained only against possible technical issues if any.

But as the workaround I suggest to hide ui_level value field

Then make your own value field using the ui_template node, place it next to the ui_level node, feed same data and you have full control over the appearance of the value field. Change the color of the text according to incoming data is show even as an example of ui_template help page. Your versin will be of course a bit more complex.

Thanks hotNipi !

template fixing

function node

let tavoite=flow.get("tuotedata.SalmonellaTavoite");
if (msg.payload > tavoite){
    }else if (msg.payload>4){
    }else if (msg.payload>0){
    }else if (msg.payload==0){
    msg.control = {seg1:4, seg2:tavoite};
return msg;


<div><b style="color:{{msg.color}}; font-size:1em">{{msg.payload}}</b></div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.