# Perspective Client not able to see variables in custom theme

**URL:** <https://forum.inductiveautomation.com/t/perspective-client-not-able-to-see-variables-in-custom-theme/38638>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [September 14, 2020, 6:46am UTC](https://forum.inductiveautomation.com/t/perspective-client-not-able-to-see-variables-in-custom-theme/38638 "2020-09-14T06:46:30Z")\
**Posts on this page:** 6\
**Page:** 1

<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:** [September 14, 2020, 6:46am UTC](https://forum.inductiveautomation.com/t/perspective-client-not-able-to-see-variables-in-custom-theme/38638/1 "2020-09-14T06:46:30Z")

</div>

v8.0.15

I have a custom theme defined that simply adds some colour variable definitions which I am using in some Style definitions. However the variable don’t seem to exist in the browser.

Browser:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/9/1951036a045857ad0816917392e3ea33276ef0b9.png)

Designer:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/9/296d4939a710f515ef12f4182e17057863573634.png)

If I change one of the colours to use a static colour then it works.

This is my style definition that the Stopped display is using

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/3/9398a61b0a7837acc5a81156a53c03b4f8dff314.png)

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [September 14, 2020, 9:47am UTC](https://forum.inductiveautomation.com/t/perspective-client-not-able-to-see-variables-in-custom-theme/38638/2 "2020-09-14T09:47:47Z")

</div>

> [@nminchin](#):
>
> This is my style definition that the Stopped display is us

Total shot in the dark, but try `var(—dev-txt-stopped)`

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [September 14, 2020, 3:54pm UTC](https://forum.inductiveautomation.com/t/perspective-client-not-able-to-see-variables-in-custom-theme/38638/3 "2020-09-14T15:54:48Z")

</div>

1. I do believe named colors require the `var()` wrapper.
2. This could also just be a caching issue, so try clearing your browser cache. I don’t believe a gateway restart is necessary.

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [September 14, 2020, 4:08pm UTC](https://forum.inductiveautomation.com/t/perspective-client-not-able-to-see-variables-in-custom-theme/38638/4 "2020-09-14T16:08:23Z")

</div>

> [@cmallonee](#):
>
> This could also just be a caching issue, so try clearing your browser cache.

Definitely looking forward to a time when refreshing theme information in the designer/client is easier during development

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [September 14, 2020, 4:09pm UTC](https://forum.inductiveautomation.com/t/perspective-client-not-able-to-see-variables-in-custom-theme/38638/5 "2020-09-14T16:09:11Z")

</div>

I _think_ we’re working on a smarter cache…

---

<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:** [September 15, 2020, 1:56am UTC](https://forum.inductiveautomation.com/t/perspective-client-not-able-to-see-variables-in-custom-theme/38638/6 "2020-09-15T01:56:58Z")

</div>

Thanks @cmallonee, wrapping in var() fixed it. I was using these originally when I found out you could use them, but I changed to removing the var() after reading the doco in the readme.md inside the theme readme:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/f/ef66efb556016488760bf2b847db8d3a0cfc3caf.png)

> Variables can also be used in the Designer's property editor as the value of a components style property. Assuming that the variable exists, of course. Simply specify the variables name as the style property value:
> 
> `backgroundColor: --corporateColor`
