Perspective themes and chart component colors

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,

if(left({this.props.theme}, 4) = 'dark',

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

Has anyone developed a beter solution?