# Fill color for \<svg\> does not work

**URL:** <https://discourse.nodered.org/t/fill-color-for-svg-does-not-work/87679>\
**Category:** Dashboard\
**Created:** [3 May 2024 09:37 UTC](https://discourse.nodered.org/t/fill-color-for-svg-does-not-work/87679 "2024-05-03T09:37:59Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [3 May 2024 16:50 UTC](https://discourse.nodered.org/t/fill-color-for-svg-does-not-work/87679/8 "2024-05-03T16:50:42Z")

</div>

You setup CSS.

You add a class name to the template.

If you want to make dynamic runtime changes, you send a msg with `.classname` set.

This way, you can keep your presentation CSS separate and centralised and anywhere you want to use the class, just apply the class.

An example: [My template nodes are ignoring my relations - #4 by Steve-Mcl](https://discourse.nodered.org/t/my-template-nodes-are-ignoring-my-relations/63385/4)

Another example: [How to use pay load in one text output trigger color applied to another? - #2 by Steve-Mcl](https://discourse.nodered.org/t/how-to-use-pay-load-in-one-text-output-trigger-color-applied-to-another/62658/2)

Yet another: [The colour in/on this isn't changing. (CSS) - #2 by Steve-Mcl](https://discourse.nodered.org/t/the-colour-in-on-this-isnt-changing-css/59639/2)

A (somewhat in-depth) chat about it (some useful tips and info): [Dashboard Button Node - \</\>Class Field not working - #19 by Steve-Mcl](https://discourse.nodered.org/t/dashboard-button-node-class-field-not-working/52651/19) (read from there down)

---

_[View the full topic](https://discourse.nodered.org/t/fill-color-for-svg-does-not-work/87679)._
