# Find and Replace: Vision Component Colors

**URL:** <https://forum.inductiveautomation.com/t/find-and-replace-vision-component-colors/70481>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [March 1, 2023, 3:34pm UTC](https://forum.inductiveautomation.com/t/find-and-replace-vision-component-colors/70481 "2023-03-01T15:34:25Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [March 2, 2023, 3:19am UTC](https://forum.inductiveautomation.com/t/find-and-replace-vision-component-colors/70481/4 "2023-03-02T03:19:02Z")

</div>

Addressing the issue here would be the better option, where the issue is that magic colours have presumably been used throughout the project, instead of being bound to a single source of truth. For example, colours (HEX) stored inside of a client tag(s) (individual or in datasets).

If this were the case, then this change is simple: make the few changes in the source colours, and then job done. It also means that anything new doesn't have to refer to another component to get the colours right, they're named appropriately at the source and can simply be picked. If you look at my posts in the topic below as well, if you use a dataset tag and a lookup function, you don't even have to pick a source colour - the lookup simply looks up the colour for you (although I don't have a solution for blinking colours using the dataset method at the moment - I haven't really thought much about it since we're now using Perspective). For individual colour tags, I used to use:

```auto
case({<Device Status Tag Path>}
	,'Stopped', {[Client]System/Styles/Colours/Device/Off}
	,'Running', {[Client]System/Styles/Colours/Device/On}
	,'Faulted', if({[Client]System/Util/Clock_1s}, {[Client]System/Styles/Colours/Device/Faulted}, {[Client]System/Styles/Colours/Device/Faulted_Flash})
	,'Invalid', {[Client]System/Styles/Colours/Device/INVALID}
)

```

Obviously, Perspective does this far more superiorly to Vision with its Perspective Styles, but you can at least have a basic version of this in Vision.

Have a read of this topic for more ideas:

> [@Creating dynamic colors](https://forum.inductiveautomation.com/t/creating-dynamic-colors/70146):
>
> Hello, I am working on a new project with Ignition 8.1.24 Vision. I would like to know if there is a nice way to create reusable colors for template animation. For example : I would like to make a library of symbols (motors valve, digital value, etc) I already have udts containing the necessary tags for the animation. Now, I would like to define a series of colors which I want to use on my templates so if for any reason i wanted to change a red 255,0,0 to a 240,0,0, I can do it easly and it…

---

_[View the full topic](https://forum.inductiveautomation.com/t/find-and-replace-vision-component-colors/70481)._
