Define Style Properties within templates based on other style properties


Well-known member
Basically, what I am trying to do is create the ability to allow users of my theme to select a simple color choice (Red, Orange, Blue, Green, etc.) which will then color the entire theme without needing to adjust the color palette manually or even use the hue slider.

Is there a way to set or define Style Properties within the templates? For example, I want to do something like:
<xen:if is="@myStyleProperty">
<xen:set @primaryMedium="rgb(0,50,0)" />
<xen:set @primaryLighter="rgb(0,100,0)" />
Is there any way to do this? As I mentioned above, the end goal is to allow theme users to be able to pick preset colors of the theme through Style Properties, or choose a "custom" color and adjust the color pallet directly. :)


XenForo developer
Staff member
No, that's not possible. In theory, you could probably do something like that with an addon.

You're probably better off creating child styles that customize only the color properties (or whatever properties you want), and have people install them as children of the base style.