Neewb user, can one change the color of the comment block for better visual separators?

Hi all

day 1 of using node-red and having a blast

I was wondering if one can change the color of the comment block for better visual separators?

ie instead of just white:

CleanShot 2022-05-29 at 09.56.47

change it to a green/red background?

and if so how is that done?

thx alot

Z

No. The node colours are fixed.

A work around would be to create a subflow with nothing inside & set up it's properties. The subflow appearance can be changed in its properties. Then you can use a subflow instance as a comment node.

Or use the grouping feature.

eg:

2 Likes

You could also put the comment node in a group and color the group

2 Likes

wow guys thx so much!

the group option @zenofmud is perfect

really appreciate the help guys!

Z

Node-red v3.0.0 (beta) can do slightly slimmer comment groups with Junctions.

And slimmer again with a subflow...

chrome_54VjdfyOjS

[{"id":"cb5c40ddc5c09ae5","type":"subflow","name":"comment-blue","info":"","category":"common","in":[],"out":[],"env":[],"meta":{},"color":"#91b9fd","icon":"font-awesome/fa-comment-o"},{"id":"cb5c40ddc5c09ae2","type":"subflow","name":"comment-green","info":"","category":"common","in":[],"out":[],"env":[],"meta":{},"color":"#8be38c","icon":"font-awesome/fa-comment-o"},{"id":"cb5c40ddc5c09ae1","type":"subflow","name":"comment-yellow","info":"","category":"common","in":[],"out":[],"env":[],"meta":{},"color":"#FFFF55","icon":"font-awesome/fa-comment-o"},{"id":"f3a7cb5e931f75a2","type":"subflow","name":"comment-red","info":"","category":"common","in":[],"out":[],"env":[],"meta":{},"color":"#FF7777","icon":"font-awesome/fa-comment-o"},{"id":"2e434c7b32ed6725","type":"subflow:f3a7cb5e931f75a2","z":"7bd70f15ef36fdcf","name":"I am a red comment 😎","x":200,"y":660,"wires":[]},{"id":"7c8be32430657181","type":"subflow:cb5c40ddc5c09ae1","z":"7bd70f15ef36fdcf","name":"I am a yellow comment 😎","x":190,"y":700,"wires":[]},{"id":"b608db944054dc04","type":"subflow:cb5c40ddc5c09ae2","z":"7bd70f15ef36fdcf","name":"I am a green comment 😎","x":190,"y":740,"wires":[]},{"id":"d80c036095877ff4","type":"subflow:cb5c40ddc5c09ae5","z":"7bd70f15ef36fdcf","name":"I am a blue comment 😎","x":190,"y":780,"wires":[]}]
1 Like

Outstanding (if a litle garish :rofl:) ! They show up in the palette, you even changed the icon.

1 Like

I like to broaden minds :wink:

1 Like

image

:smile_cat: No sub-flows harmed in the making of this. A prize for anyone who can work it out (well not really but then it is a fudge anyway!).

custom CSS?

src code hack?

My first thought, but no, the SVG isn't coded to allow the fill to be variable - I think it could be by the way, about to test that.

Of course :wink: You win the prize: :beers:

Fudge! Fudge! You’re making fudge!?!

I suspect most of my coding is fudge!

2 Likes

So, maybe this is a core improvement request. Rather than using a fixed colour in the fill, better to use a CSS variable. Just tested that and it works.

image

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