Changing color of text and displayed text in UI

1,170 views
Skip to first unread message

Antoine Aflalo

unread,
Apr 22, 2014, 3:28:42 PM4/22/14
to node...@googlegroups.com
Hi,

I would like to know if there is a way to change the color of the Text inside a Node in the UI. 
I also would like to know if there is a way to change the "name" displayed into the UI bar on the left ?
I attached a screen of the node I created that lead me to this question.

The label has been set to display Transmission when there is nothing into the node, but the bar on the left doesn't seems to take it into account and prefer to take the "type" of my node as display text.
I checked the IRC node to try to understand how I could change that, without any success.

Best Regards,
Antoine Aflalo

Capture.JPG

Nicholas O'Leary

unread,
Apr 22, 2014, 6:27:57 PM4/22/14
to node...@googlegroups.com
Hi,

it is possible to change the style of the label - you can set the 'labelStyle' property of the node definition to whatever css style you want (you will have to have a <style> block in your nodes .html file to add the style).

From a overall style point of view, changing the font-colour is something we would discourage. You should pick the node colour carefully to make sure you get one that works.

The name in the palette on the left is based on the node name as defined in the .html - not the label property which is used when labelling a node in the workspace itself. If the node name ends with " out" or " in" we strip that off as it isn't generally useful when you also get to see the inputs/outputs in the palette.

This does mean you currently have to pick short names that fit within the size of the node in the palette. 

As I mentioned in the other thread, we are thinking about how we can better organise and layout the palette - so all of this is subject to change to make it more flexible and adaptable.

Nick



--
http://nodered.org
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Antoine Aflalo

unread,
Apr 23, 2014, 2:06:11 AM4/23/14
to node...@googlegroups.com

Hi Nick,

Thanks for the answer, I'll short the name to make it fit, after all there is the description.

I understand that you want to keep an homogeneous look instead of having some node written in white,  blue, etc...

I just have another question, why Node-RED is converting the hex color code into rgb when applying the style to the node?
Because of that it seems I never get exactly the color I set.

Antoine Aflalo

You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/g2RPH2G2QZ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+u...@googlegroups.com.

Michael Boldischar

unread,
Feb 13, 2015, 2:04:20 PM2/13/15
to node...@googlegroups.com
Hi Nick,

It would be nice for company branding if all colors of text were allowed in nodes.  From my limited testing, I see the "labelStyle" property only applies to nodes after they have been dragged into the flow.  Otherwise, the text is always black.  My goal would be to make white node labels on blue nodes.  Then, the user would know the node belongs to a particular vendor.  I don't think this is currently possible.
Reply all
Reply to author
Forward
0 new messages