# Best way to reuse colors between text and a button background?

**URL:** <https://forum.inductiveautomation.com/t/best-way-to-reuse-colors-between-text-and-a-button-background/97148>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 11, 2024, 2:55pm UTC](https://forum.inductiveautomation.com/t/best-way-to-reuse-colors-between-text-and-a-button-background/97148 "2024-10-11T14:55:41Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [October 14, 2024, 9:40am UTC](https://forum.inductiveautomation.com/t/best-way-to-reuse-colors-between-text-and-a-button-background/97148/7 "2024-10-14T09:40:40Z")

</div>

The problem with perspective styles vs variables is that styles require you to apply the color to something. So if I want to use the same color for a text, for a background, for a border, and whatever else, I'll need to make as many styles, instead of just using that variable. It's frustrating.

Instead, I use the method @bmusson described in the [css thread](https://forum.inductiveautomation.com/t/useful-css-stuff/95414/2) a while ago, with variable indirection, in the stylesheet or theme files. Then I create empty perspective styles with the same names to make them easily selectable.  
For one of a kind stuff, I still use the variable directly in the properties. It's somewhat buggy in the designer, as it doesn't update systematically, but I don't mind.

---

_[View the full topic](https://forum.inductiveautomation.com/t/best-way-to-reuse-colors-between-text-and-a-button-background/97148)._
