# Icon Color - Output Text Box

**URL:** <https://discourse.nodered.org/t/icon-color-output-text-box/71734>\
**Category:** Dashboard\
**Created:** [5 December 2022 23:21 UTC](https://discourse.nodered.org/t/icon-color-output-text-box/71734 "2022-12-05T23:21:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joaovitor](https://avatars.discourse-cdn.com/v4/letter/j/3ab097/32.png) [@Joaovitor](https://discourse.nodered.org/u/Joaovitor)\
**Post date:** [5 December 2022 23:21 UTC](https://discourse.nodered.org/t/icon-color-output-text-box/71734/1 "2022-12-05T23:21:05Z")

</div>

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?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/4/74004abd3e81b9b7fb4e513e6c14f1640e70dd8a.png)

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [6 December 2022 02:02 UTC](https://discourse.nodered.org/t/icon-color-output-text-box/71734/2 "2022-12-06T02:02:13Z")

</div>

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.

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

</span>

```

---

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [6 December 2022 16:08 UTC](https://discourse.nodered.org/t/icon-color-output-text-box/71734/3 "2022-12-06T16:08:39Z")

</div>

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)

```auto
<style>
    .value {
        color: red;

        }

</style>

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [5 January 2023 16:09 UTC](https://discourse.nodered.org/t/icon-color-output-text-box/71734/4 "2023-01-05T16:09:34Z")

</div>

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