# Font color in List Node

**URL:** <https://discourse.nodered.org/t/font-color-in-list-node/47917>\
**Category:** General\
**Created:** [1 July 2021 21:12 UTC](https://discourse.nodered.org/t/font-color-in-list-node/47917 "2021-07-01T21:12:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsplitz](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dsplitz/32/49940_2.png) [@dsplitz](https://discourse.nodered.org/u/dsplitz)\
**Post date:** [1 July 2021 21:12 UTC](https://discourse.nodered.org/t/font-color-in-list-node/47917/1 "2021-07-01T21:12:01Z")

</div>

I'm using a function node to send an array of data to a list node.  
My goal is for the description color to change based on the value.

Here's my function node code:

var array = flow.get('DevStat')  
var combo = [{}]  
var single = {}

for(let i=0;i\<1000;i++){  
//single = ={"title":" **EndPoint**","description":"This is description of \<font color="red"\> **Apple**.","icon":"[https://upload.wikimedia.org/wikipedia/commons/thumb/1/15/Red\_Apple.jpg/500px-Red\_Apple.jpg](https://upload.wikimedia.org/wikipedia/commons/thumb/1/15/Red_Apple.jpg/500px-Red_Apple.jpg)"}  
single ={}  
if (array[i] === 0)  
{  
single.description = "\<font color="white"\> "  
}  
else if (array[i] === 1)  
{  
single.description = "\<font color="yellow"\> "  
}  
else  
{  
single.description = "\<font color="red"\>"  
}

```
single.title = "EndPoint"

single.description += i.toString(10)

```

combo.push(single)  
}

msg.payload = combo

return msg;

And the result looks like this

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/6/c672a396ebaaf40f9e165bd08e4efa8f39f2fdc6.png)

As you see, the color control prints and the color does not change.

Is there a way to make this work?

---

<div class="post-metadata">

**Author:** ![dsplitz](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dsplitz/32/49940_2.png) [@dsplitz](https://discourse.nodered.org/u/dsplitz)\
**Post date:** [2 July 2021 14:14 UTC](https://discourse.nodered.org/t/font-color-in-list-node/47917/2 "2021-07-02T14:14:03Z")

</div>

I solved this by enabling HTML in the LIST node.

---

<div class="post-metadata">

**Author:** ![Gunner](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gunner/32/43582_2.png) [@Gunner](https://discourse.nodered.org/u/Gunner)\
**Post date:** [3 July 2021 02:49 UTC](https://discourse.nodered.org/t/font-color-in-list-node/47917/3 "2021-07-03T02:49:18Z")

</div>

Speaking of esthetics 😛 You should be formatting posted code using the \</\> icon so we can all tell the difference between code and post commentary.

---

<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:** [17 July 2021 02:49 UTC](https://discourse.nodered.org/t/font-color-in-list-node/47917/4 "2021-07-17T02:49:30Z")

</div>

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