# Style class not working on Icon

**URL:** <https://forum.inductiveautomation.com/t/style-class-not-working-on-icon/45866>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [April 21, 2021, 3:02pm UTC](https://forum.inductiveautomation.com/t/style-class-not-working-on-icon/45866 "2021-04-21T15:02:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![retinder.labana](https://avatars.discourse-cdn.com/v4/letter/r/54ee81/32.png) [@retinder.labana](https://forum.inductiveautomation.com/u/retinder.labana)\
**Post date:** [April 21, 2021, 3:02pm UTC](https://forum.inductiveautomation.com/t/style-class-not-working-on-icon/45866/1 "2021-04-21T15:02:54Z")

</div>

Im trying to fill the warning icon red by calling the Warning class I created

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/4/149df6e453d8bdc6104606d5c76c9c9feda00def.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/c/3ccf8bf1c18031b8b25405fee12b65538fd5453a.png)

I added color to the right property but the color is not changing

If you are calling it through classes are you suppose to add color to a different property?

---

<div class="post-metadata">

**Author:** ![matthew.ayre](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matthew.ayre/32/19499_2.png) [@matthew.ayre](https://forum.inductiveautomation.com/u/matthew.ayre)\
**Post date:** [April 21, 2021, 3:21pm UTC](https://forum.inductiveautomation.com/t/style-class-not-working-on-icon/45866/2 "2021-04-21T15:21:21Z")

</div>

Hi @retinder.labana, you will need to use the text color property instead.

I take no credit, I just remembered [this](http://forum.inductiveautomation.com/t/the-icon-component-in-8-1-doesnt-accept-css3-fill-property-in-style-class/45646/2) post which @swolnisty found the solution to a little while ago.

---

<div class="post-metadata">

**Author:** ![retinder.labana](https://avatars.discourse-cdn.com/v4/letter/r/54ee81/32.png) [@retinder.labana](https://forum.inductiveautomation.com/u/retinder.labana)\
**Post date:** [April 21, 2021, 3:53pm UTC](https://forum.inductiveautomation.com/t/style-class-not-working-on-icon/45866/3 "2021-04-21T15:53:27Z")

</div>

Thank you Mathew 🙂

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [April 21, 2021, 7:42pm UTC](https://forum.inductiveautomation.com/t/style-class-not-working-on-icon/45866/4 "2021-04-21T19:42:27Z")

</div>

Maybe they fixed ithis, but you used to also have to set the props colour to ‘unset’ as well so that it wouldn’t override the style.
