# Perspective themes and chart component colors

**URL:** <https://forum.inductiveautomation.com/t/perspective-themes-and-chart-component-colors/80419>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 12, 2023, 10:45pm UTC](https://forum.inductiveautomation.com/t/perspective-themes-and-chart-component-colors/80419 "2023-10-12T22:45:00Z")\
**Posts on this page:** 1\
**Page:** 1

<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:** [October 12, 2023, 10:45pm UTC](https://forum.inductiveautomation.com/t/perspective-themes-and-chart-component-colors/80419/1 "2023-10-12T22:45:01Z")

</div>

The AM Charts components on which the Perspective chart components are based don't understand CSS built-in theme variables such as `--neutral-80`, etc. In our applications we almost always allow the user to choose between light and dark themes.

As a workaround I have created session custom variables containing color variables to match the built-in themes. Where needed I'll create a binding such as,

```auto
if(left({this.props.theme}, 4) = 'dark',
    '#fafafa',
    '#101010'
)

```

This is a bit of extra work and it's easy to let things get out of sync.

Has anyone developed a beter solution?
