Theme Designer
The Theme Designer is an example scene that makes a theme without writing USS by hand. The left side previews buttons, fields, toggles, a slider, tabs, a list, badges, a stat tile, a chart, a window and a dialog. The right side edits the tokens of the theme. A change shows in the preview at once. Save USS writes a sheet with only the tokens you changed.


Scene: Assets/UIToolbox/Examples/Scenes/ThemeDesignerDemo.unity. Folder: Assets/UIToolbox/Examples/ThemeDesignerDemo. It works in the Editor and in a player build.
What you can edit
| Group | Tokens |
|---|---|
| Surfaces | --tb-color-background, -surface, -surface-alt, -surface-hover |
| Text | --tb-color-text, -text-muted, -text-disabled |
| Accent | --tb-color-accent, -accent-text |
| Border and focus | --tb-color-border, -focus-ring |
| State colors | --tb-color-danger, -danger-text, -text-danger, -success, -warning |
| Shape and spacing | --tb-radius-sm, -radius-md, --tb-spacing-xs to -lg |
Each color has a compact ColorPicker. Each length has a slider. The x button next to a row resets that token to the base theme, and Reset all resets every token. The Theme dropdown is a ThemeSelector. It changes the base theme, and every token that you did not change follows it.
Fonts, images and per-control overrides are not part of the designer. Write those in your own USS.
Accent presets
The eight swatches (Blue, Teal, Green, Amber, Red, Purple, Pink and Slate) set the accent, the text on it (white or dark, whichever reads better) and a focus ring that keeps 3:1 against the surfaces.
Contrast guard
A badge with a ratio shows next to a color that is hard to read on its background. Text needs 4.5:1. A focus ring needs 3:1. Hover the badge to see the background and the smallest ratio. The pairs are the ones that Tools/style-audit checks, so a design with no badge passes that audit. The border has a softer rule: it warns about the surface only after you change it, because the borders of the shipped themes are quiet lines.
Save and load
Save USS writes Assets/<File name>.uss. The sheet holds one :root, .tb-workspace rule with only the changed tokens, so the base theme does the rest:
/* Theme Designer, over dark */
:root, .tb-workspace {
--tb-color-accent: #0f766e;
--tb-color-accent-text: #ffffff;
--tb-radius-sm: 6px;
}
In a player build there is no Assets folder, so Save USS shows the text in a dialog with a Copy button. Load USS reads the file of the same name back in the Editor. In a player it shows a dialog to paste the text into. Unknown variables and comments in the sheet are ignored.
To use the sheet, put it in a Resources folder and add it after the theme:
var sheet = Resources.Load<StyleSheet>("MyTheme");
workspace.SetTheme("dark");
workspace.AddUserStyleSheet(sheet);
See Write a custom theme for the other ways to load a theme, and Theme variables for every token.
How the preview works
Unity cannot make a style sheet from text while the game runs, so the preview does not load the sheet it is writing. It sets the colors, the radius and the padding of its elements as inline styles from the same tokens. The saved USS is what styles the real controls. The designer reads the real values of the base theme from a hidden element, so it starts from the theme that is on.
Controls
Mouse, keyboard and gamepad all work. The d-pad moves between the rows. A opens the color picker of a row, and B or Escape closes it again. Navigation never leaves the scene.