# Any workaround for get color from variable in perspective

**URL:** <https://forum.inductiveautomation.com/t/any-workaround-for-get-color-from-variable-in-perspective/91110>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [May 29, 2024, 11:33pm UTC](https://forum.inductiveautomation.com/t/any-workaround-for-get-color-from-variable-in-perspective/91110 "2024-05-29T23:33:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gpellicelli](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/gpellicelli/32/53466_2.png) [@gpellicelli](https://forum.inductiveautomation.com/u/gpellicelli)\
**Post date:** [May 29, 2024, 11:33pm UTC](https://forum.inductiveautomation.com/t/any-workaround-for-get-color-from-variable-in-perspective/91110/1 "2024-05-29T23:33:31Z")

</div>

Hi,

After working with perspective a bit, I have seen some Perspective Components that have color properties not working with variable css color in the theme file variable... Its really a problem. Am currently making an Analysis page with a XY chart to show state for the line during the production and have some color that I use everywhere with the variable var(--oee-state3). So I want to know if someone have found a workaround.. Like a custom property with a script to convert the variable into a real color format to be bind after? As you can see in the picture on top, I got a label with the variable I try to use as an example and you can see that on the XY charts the red color not showing in the category Unplanned Downtime.

Best regards,

Gabriel

 ![bug](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/d/5d123a5b3160deb7b149fcc9e1555b27f26820bf.jpeg)

---

<div class="post-metadata">

**Author:** ![andrew.budaiev](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andrew.budaiev/32/72921_2.png) [@andrew.budaiev](https://forum.inductiveautomation.com/u/andrew.budaiev)\
**Post date:** [May 30, 2024, 12:04am UTC](https://forum.inductiveautomation.com/t/any-workaround-for-get-color-from-variable-in-perspective/91110/2 "2024-05-30T00:04:09Z")

</div>

Looks like this is general problem with chart components, they do not accept CSS variables.  
[Theme color variables in Piechart are not supported? - Ignition - Inductive Automation Forum](https://forum.inductiveautomation.com/t/theme-color-variables-in-piechart-are-not-supported/55360)  
[Perspective Css-Theme-Variable not working on all Controls - Ignition - Inductive Automation Forum](https://forum.inductiveautomation.com/t/perspective-css-theme-variable-not-working-on-all-controls/66629)  
[[BUG-1512] SimpleGauge color props do not accept "named colors" from theme variables - Ignition Early Access - Inductive Automation Forum](https://forum.inductiveautomation.com/t/bug-1512-simplegauge-color-props-do-not-accept-named-colors-from-theme-variables/36786)

You can try [ApexCharts](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263).

---

<div class="post-metadata">

**Author:** ![gpellicelli](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/gpellicelli/32/53466_2.png) [@gpellicelli](https://forum.inductiveautomation.com/u/gpellicelli)\
**Post date:** [May 30, 2024, 1:35pm UTC](https://forum.inductiveautomation.com/t/any-workaround-for-get-color-from-variable-in-perspective/91110/3 "2024-05-30T13:35:11Z")

</div>

Thanks you am gonna look into that free module 🙂
