# Changing the color or build in images of components

**URL:** <https://forum.inductiveautomation.com/t/changing-the-color-or-build-in-images-of-components/77479>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [August 4, 2023, 7:58pm UTC](https://forum.inductiveautomation.com/t/changing-the-color-or-build-in-images-of-components/77479 "2023-08-04T19:58:30Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cameron\_Nickle](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@Cameron\_Nickle](https://forum.inductiveautomation.com/u/Cameron_Nickle)\
**Post date:** [August 4, 2023, 7:58pm UTC](https://forum.inductiveautomation.com/t/changing-the-color-or-build-in-images-of-components/77479/1 "2023-08-04T19:58:30Z")

</div>

Hi all,

I'm just trying to add a little personality to my project and I'd like to change the color of the little eyes beside the password field in perspective. Is it possible to do that?

These guys:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/6/c64b594c59972031ca0477871f40460ea0dd0beb.png)

Thank you,

Cam

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [August 4, 2023, 8:22pm UTC](https://forum.inductiveautomation.com/t/changing-the-color-or-build-in-images-of-components/77479/2 "2023-08-04T20:22:13Z")

</div>

If you're on \> 8.1.22 you can add the override in stylesheet.css.

- In Project Browser right-click on Perspective | Styles and select [Enable Advanced Stylesheet](https://docs.inductiveautomation.com/display/DOC81/Style+Classes#StyleClasses-EnablingtheAdvancedStylesheet) the stylesheet.
- Paste in the following:

```auto
.ia_passwordFieldComponent__visibilityIcon {
    fill: var(--success);
}

```

Here I've changed the default `--callToAction` color from the built-in themes to the "success" green. You can choose any CSS color but if you use the built-in themes it will change nicely with the theme.

[https://docs.inductiveautomation.com/display/DOC81/Perspective+Built-In+Themes](https://docs.inductiveautomation.com/display/DOC81/Perspective+Built-In+Themes)

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [August 4, 2023, 8:22pm UTC](https://forum.inductiveautomation.com/t/changing-the-color-or-build-in-images-of-components/77479/3 "2023-08-04T20:22:14Z")

</div>

Sure is.

Easiest way would be to change the color of the `--callToAction` variable in whatever theme you're using, however, that will have other effects that you may not want.

You can also create your own variable to hold the color.

The color is set with the CSS class `.ia_passwordFieldComponent__visibilityIcon`

I don't have a new enough version yet to have the style sheets but if you put this in the backgroundImage prop inside of the props.style for the component it will change the color to red.

```auto
}.ia_passwordFieldComponent__visibilityIcon{"fill":rgba(255,0,0,255);}{

```

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [August 4, 2023, 8:23pm UTC](https://forum.inductiveautomation.com/t/changing-the-color-or-build-in-images-of-components/77479/4 "2023-08-04T20:23:53Z")

</div>

> [@Transistor](#):
>
> recent version (\> 8.1.15 maybe?)

8.1.22

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [August 4, 2023, 8:25pm UTC](https://forum.inductiveautomation.com/t/changing-the-color-or-build-in-images-of-components/77479/5 "2023-08-04T20:25:20Z")

</div>

> [@lrose](#):
>
> 8.1.22

I found it while you were answering. Thanks.

---

<div class="post-metadata">

**Author:** ![Cameron\_Nickle](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@Cameron\_Nickle](https://forum.inductiveautomation.com/u/Cameron_Nickle)\
**Post date:** [August 4, 2023, 8:37pm UTC](https://forum.inductiveautomation.com/t/changing-the-color-or-build-in-images-of-components/77479/6 "2023-08-04T20:37:23Z")

</div>

I should have specified that I don't know any CSS and am trying to just use the little style class system that Ignition offers 😅

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [August 4, 2023, 8:42pm UTC](https://forum.inductiveautomation.com/t/changing-the-color-or-build-in-images-of-components/77479/7 "2023-08-04T20:42:34Z")

</div>

The problem with style classes is that you don't get to chose precisely what it applies to.

The suggested solution is very basic css, you'll figure it out in no time.  
I recommend learning the basics if you want to make things look nice in perspective. It's really not that hard. Read about selectors and how to apply styles, then you can google the actual properties and their accepted values when you need them.

---

<div class="post-metadata">

**Author:** ![Tim\_Carlton](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim_carlton/32/52835_2.png) [@Tim\_Carlton](https://forum.inductiveautomation.com/u/Tim_Carlton)\
**Post date:** [August 4, 2023, 8:49pm UTC](https://forum.inductiveautomation.com/t/changing-the-color-or-build-in-images-of-components/77479/8 "2023-08-04T20:49:44Z")

</div>

To take the opposing view before calling it a week, **Don't**.  
Use the tool as designed. Learn and use what it can do out of the box. Live in the walled garden. It is pretty here. You can be productive. You probably don't need to spend time changing the default look and feel.

(note - opinions expressed here do not necessarily represent those of my employer, the forum software company, the forum sponsor, me, or anyone really.)

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [August 4, 2023, 8:56pm UTC](https://forum.inductiveautomation.com/t/changing-the-color-or-build-in-images-of-components/77479/9 "2023-08-04T20:56:47Z")

</div>

I understand that staying in supported territory is preferable, but... the stylesheet is built into the designer now, and it's really not something that will break things badly.  
Worst case scenario, it doesn't look like what you wanted, you delete the line, close the sheet and you're back to square one.

---

<div class="post-metadata">

**Author:** ![aaronrai24](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aaronrai24/32/87248_2.png) [@aaronrai24](https://forum.inductiveautomation.com/u/aaronrai24)\
**Post date:** [August 5, 2023, 2:11am UTC](https://forum.inductiveautomation.com/t/changing-the-color-or-build-in-images-of-components/77479/10 "2023-08-05T02:11:28Z")

</div>

To add on to this you can still use style classes in a similar way by using 'stub classes'. This allows you to still have the luxury of selecting your style class from the selector, but the liberty to add your own CSS in the stylesheet.

> [@Create a style class that i can bind to with non-dialog properties?](https://forum.inductiveautomation.com/t/create-a-style-class-that-i-can-bind-to-with-non-dialog-properties/76603/5):
>
> Would require embedding a full CSS parser in the Java side of the application. Not impossible, but not a high priority. You could make a 'stub' style class (with no actual effects) so that it shows up in the selector, and then do all of the actual CSS authoring in the stylesheet. The big downside there is maintenance burden. I'm personally in favor of the idea of allowing arbitrary CSS editing inside a style class (with a one-way operation to convert the builder into a plain text input), but I…

As mentioned this isn't the from a maintenance standpoint and why I prefer to create custom perspective themes.
