Icon Color - Output Text Box

I was working with Node-RED and had a little problem when adding icons to a text output node. With some research I solved my problems.

Now I want to be able to define, in addition to the icon, the color of the icon, all through the same message inserted in the input.

How could I proceed?

I think the text node strips out any formatting, in any case you may find a ui-template node allows for more flexibility.

Here is an example from one of my flows.

You can send in msg properties to change fonts colours etc as you like then.

<span
    style="font-size: 16px;background: transparent; color:{{msg.color}}">
    <font color="#eeeeee">Week<br/></font>
    £{{msg.week}}

</span>

You could try a template node as 'widget in a group' and dashboard Group where your text node is. In the text node enter value in the Class input box (color can obviously be any colour you like)

<style>
    .value {
        color: red;

        }

</style>

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