This document assumes using V3 styles, which were introduced at the end of November 2025. If your project is using V2 visuals, you need to upgrade to V3 before the styling discussed on this document can be used.
Gum can be restyled using an ActiveStyle object. Changes to ActiveStyle result in style changes for all controls created after the change is made. ActiveStyle can make it easy to restyle all controls without needing to make changes to each individual control.
Styling.ActiveStyle.Colors
Gum includes a Styling object which contains multiple color values for default styling. For example the Primary color can be changed using the following code:
Code Example: Applying Styles Before Creating Controls
The Styling.ActiveStyle.Color property includes styles that are used by controls when they are created. We can see how these affect controls by creating a sample project:
This code produces a set of controls which can be used to check how styling is applied.
Controls using default styles
Controls using default styles (Animated)
We can prefix the following code before creating all of our controls:
By changing these colors, controls are created using the new colors:
Colors changed with minimal code
All Styling behaviors remain (darken/lighten)
Styling and Creation Order
Styling only applies after it has been set. Controls which are created before styling is set do not automatically update to the new style. The following code shows how order can impact how styling is assigned:
This behavior may change in future versions of Gum.
var stackPanel = new StackPanel();
stackPanel.AddToRoot();
stackPanel.Anchor(Anchor.Center);
var button1 = new Button();
stackPanel.AddChild(button1);
Styling.ActiveStyle.Colors.Primary = Color.Red;
var button2 = new Button();
stackPanel.AddChild(button2);
Styling.ActiveStyle.Colors.Primary = Color.Purple;
var button3 = new Button();
stackPanel.AddChild(button3);