# I am not getting the meaning of the different colours for text in messages

**URL:** <https://discourse.nodered.org/t/i-am-not-getting-the-meaning-of-the-different-colours-for-text-in-messages/15217>\
**Category:** General\
**Created:** [7 September 2019 00:28 UTC](https://discourse.nodered.org/t/i-am-not-getting-the-meaning-of-the-different-colours-for-text-in-messages/15217 "2019-09-07T00:28:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [7 September 2019 00:28 UTC](https://discourse.nodered.org/t/i-am-not-getting-the-meaning-of-the-different-colours-for-text-in-messages/15217/1 "2019-09-07T00:28:14Z")

</div>

If a message is text, and it is displayed in a `debug` node it is colour: red with `"` around it.

If it is a number it is blue.

If it is `true` or `false` it is blue.

That's where the problem (for me) starts.

In a `function` node if I am looking at `true` or `false` (boolean) messages they are orange.  
(Well, I'll call it orange for the sake it is not RED and not BLUE.)

I am trying to make a flow that deal with `true` and `false` messages.

I have a button which injects `false` and it is going into nodes and nothing is happening.

Putting `debug` nodes I am seeing BLUE message text with true (or) false.  
(Given that there are also `true` messages in the mix)

And I am not guaranteed that they are the boolean `true` `false` messages.

Anyone - please?

Yeah, ok. TEXT versions of `true` will show up as `"true"` and the boolean will simply be `true`.

But why is it not shown as orange like in the `function` node?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [7 September 2019 00:49 UTC](https://discourse.nodered.org/t/i-am-not-getting-the-meaning-of-the-different-colours-for-text-in-messages/15217/2 "2019-09-07T00:49:39Z")

</div>

It would be much easier if you just pasted the output so we could see it.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [7 September 2019 02:14 UTC](https://discourse.nodered.org/t/i-am-not-getting-the-meaning-of-the-different-colours-for-text-in-messages/15217/3 "2019-09-07T02:14:29Z")

</div>

I am going to be called a lot of names for this, but this is what I am seeing and am _confused_ by it because of the lack of consistency.

1: boolean.  
2: text  
3: number

Note the colours as seen in a `function` node.

![Screenshot%20from%202019-09-07%2012-08-55](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/1/1de23ea5b61fb68dfef3699583e137f5fda1ffd1.png)

Now in a `debug` node:

![Screenshot%20from%202019-09-07%2012-09-46](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/6df5044d23b0f4136b756b3ee1d11fcd4ba38d7f.png)

Why can't the colours be the same?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [7 September 2019 06:30 UTC](https://discourse.nodered.org/t/i-am-not-getting-the-meaning-of-the-different-colours-for-text-in-messages/15217/4 "2019-09-07T06:30:07Z")

</div>

> [@Trying\_to\_learn](#):
>
> Why can't the colours be the same?

A reasonable question. Right now the text editor uses a different colour palette to the rest of Node-RED. There's no special significance to the difference, just something we've never thought about. You are the first person to point it out. The colour is only a hint anyway - the quotes help differentiate a string from the other types regardless of colour.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [7 September 2019 07:05 UTC](https://discourse.nodered.org/t/i-am-not-getting-the-meaning-of-the-different-colours-for-text-in-messages/15217/5 "2019-09-07T07:05:51Z")

</div>

Yes, and I have see this.

Just after more than an hour running around going nowhere with my other post (now updated) about message, topics, buttons etc. I was looking at the debug output on the left and seeing `false` in blue rather than orange when viewed in the function node and got flustered with it maybe being text rather than boolean.

Event (repeating myself. Ok. I am sure you get it.)

I'll shut up now.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [7 September 2019 07:33 UTC](https://discourse.nodered.org/t/i-am-not-getting-the-meaning-of-the-different-colours-for-text-in-messages/15217/6 "2019-09-07T07:33:41Z")

</div>

It is a reasonable point for sure. However, the line above the data does clearly tell you what it is. Though only for a single value.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [7 September 2019 07:35 UTC](https://discourse.nodered.org/t/i-am-not-getting-the-meaning-of-the-different-colours-for-text-in-messages/15217/7 "2019-09-07T07:35:15Z")

</div>

The debug colours were chosen to match the chrome browser dev tools.
