matlab/matlab-agentic-toolkit / skills-catalog/matlab-app-building/matlab-apply-theme
matlab-apply-theme
VerifiedStyle MATLAB charts and figures. colororder palettes for chart series colors, colormap selection, brand color organization, and the R2025a Theme API for uifigure apps (dark mode with fliplightness, ThemeChangedFcn, uistyle, component colors). Use when customizing chart colors, applying a color palette, organizing brand colors, implementing dark mode, or importing an external color scheme. Triggers: theme, dark mode, brand colors, colororder, colormap, palette, fliplightness, color scheme, styling, chart colors.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.1 KB |
| manifest.yaml | config | 479 B |
| references/component-colors.mdexecutable | script | 2.0 KB |
| references/external-schemes.mdexecutable | script | 2.1 KB |
| references/theme-api.mdexecutable | script | 1.5 KB |
references/theme-api.md
View on GitHub# R2025a Theme API
## Lock a Figure to a Theme
```matlab
fig = uifigure(Theme="light"); % Always light, regardless of OS
fig = uifigure(Theme="dark"); % Always dark
fig = uifigure; % Follows OS/MATLAB desktop preference (default)
```
## Detect Current Theme
```matlab
baseStyle = fig.Theme.BaseColorStyle; % Returns "light" or "dark"
```
## React to Theme Changes
```matlab
fig.ThemeChangedFcn = @(src, ~) onThemeChanged(src);
function onThemeChanged(fig)
if fig.Theme.BaseColorStyle == "light"
% Apply light brand colors
else
% Apply dark brand colors
end
end
```
## What the Theme API Handles Automatically
When `ColorMode` stays `"auto"` (the default), these adapt to light/dark without any code:
- Figure background
- Panel, tab group, grid layout backgrounds
- Edit field, dropdown, listbox, spinner backgrounds and text
- Label text color
- Axes background, grid lines, tick labels
- Default plot series colors (gem palette for light, glow for dark)
## What Breaks Automatic Theming
Setting any color explicitly switches `ColorMode` to `"manual"`:
```matlab
btn.BackgroundColor = [0.2 0.4 0.8]; % Now manual — won't adapt to theme
btn.BackgroundColorMode = "auto"; % Restore theme control
```
Three ways `ColorMode` becomes `"manual"`:
1. Set the color property: `btn.BackgroundColor = [...]`
2. Set the mode explicitly: `btn.BackgroundColorMode = "manual"`
3. Pass color to a plot call: `plot(x, y, "-red")`
----
Copyright 2026 The MathWorks, Inc.
----
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |