Overview
WindUI ships with a full theming system. Every color used by every element — backgrounds, text, sliders, toggles, buttons, and more — is driven by the active theme. You can set a theme at window creation, switch it at runtime, listen for changes, or register your own custom themes.Setting a Theme at Creation
Pass aTheme key to WindUI:CreateWindow(). The value must be the exact name of a registered theme.
Built-in Themes
| Name | Description |
|---|---|
Dark | Deep zinc/charcoal background with white text and blue accents — the default. |
Light | White background with black text. |
Rose | Deep rose/pink tones. |
Plant | Forest green palette. |
Red | True red dark theme. |
Indigo | Dark indigo/navy theme. |
Sky | Cyan and sky-blue accents on a dark teal background. |
Violet | Purple/violet dark theme. |
Amber | Warm amber tones with gradient support. |
Emerald | Teal/emerald dark theme. |
Midnight | Deep blue/midnight theme. |
Crimson | Near-black background with crimson accents. |
Monokai Pro | Dark editor-style theme with coral, purple, and green highlights. |
Cotton Candy | Pink and cyan pastel dark theme. |
Mellowsi | Warm brown/sepia tones. |
Rainbow | Full-spectrum gradient accents and backgrounds. |
Runtime API
WindUI:SetTheme(name)
Switches the active theme immediately. All themed UI elements update without a reload. Returns the theme table, or nil if the name is not found.
WindUI:GetCurrentTheme()
Returns the name of the currently active theme as a string.
WindUI:GetThemes()
Returns the full themes table, keyed by theme name. Useful for building a theme picker dropdown.
WindUI:OnThemeChange(callback)
Registers a function that is called whenever SetTheme is invoked with a valid theme name. The callback receives the new theme name as a string.
Custom Themes
UseWindUI:AddTheme(themeTable) to register a new theme. The theme table must have a Name field and at minimum the core color keys. It is then available by name for SetTheme and CreateWindow({ Theme = "..." }).
Color Keys
The following keys are recognized. Those not specified fall back to the inherited rendering defaults.| Key | Type | Description |
|---|---|---|
Name | string | Theme identifier used in API calls. |
Accent | Color3 | gradient | Sidebar and accent surfaces. |
Background | Color3 | gradient | Main window background fill. |
Dialog | Color3 | gradient | Dialog/modal background. |
Outline | Color3 | Border/outline tint. |
Text | Color3 | gradient | Primary text and icon color. |
Placeholder | Color3 | Placeholder text in inputs. |
Button | Color3 | gradient | Default button background. |
Icon | Color3 | Icon tint color. |
Toggle | Color3 | gradient | Toggle switch active color. |
Slider | Color3 | Slider fill/thumb color. |
Checkbox | Color3 | gradient | Checkbox active fill. |
Primary | Color3 | Primary action accent (used by some elements). |
PanelBackground | Color3 | Content panel background. |
PanelBackgroundTransparency | number | Transparency for the panel (0–1). |
LabelBackground | Color3 | Background behind label elements. |
LabelBackgroundTransparency | number | Transparency for label backgrounds. |
WindUI:Gradient(stops, props) — see Gradient Support below.
Simple Custom Theme
Gradient Support
Any color key that accepts a gradient takes the return value ofWindUI:Gradient(stops, props).
stops is a table keyed by percentage strings ("0" to "100"). Each stop is a table with Color (a Color3) and an optional Transparency (number, 0–1).
props is an optional table of extra properties for the UIGradient — typically { Rotation = 45 }.