Styles MATLAB charts and figures with colororder palettes, colormap selection, brand color organization, and the R2025a Theme API for uifigure dark mode, fliplightness, ThemeChangedFcn, uistyle, and component colors.
Ships in matlab-app-building. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Style MATLAB charts with color palettes and — for uifigure apps — apply the R2025a Theme API for brand colors, dark mode, and component styling.
Use this skill when:
colororder for chart series colors (any context)colormap for continuous datafliplightness() (uifigure)ThemeChangedFcn to react to OS/user theme changes (uifigure)uistyle for conditional formatting in tables/trees (uifigure)matlab-build-chart)matlab-build-app — it invokes this skill for theming sub-steps)Color property directly)colororder() for categorical chart series colorscolormap() for continuous scalar-mapped colorscolororder (categorical series) with colormap (continuous gradient)fliplightness() to derive dark variants unless explicitly designing custom dark colorsBoth MATLAB and web implementations map to these common tokens. When importing an external color scheme, map its colors to these tokens once.
| Token | Purpose | MATLAB (struct field) | Web (CSS variable) |
|---|---|---|---|
primary | Brand/action color (buttons, links, active states) | theme.primary | --accent |
onPrimary | Text/icon on primary background | theme.onPrimary | --accent-text |
secondary | Secondary brand color (less prominent actions) | theme.secondary | --secondary |
error | Error/destructive state | theme.error | --error |
success | Success/confirmation state | theme.success | --success |
warning | Warning/caution state | theme.warning | --warning |
border | Custom borders and dividers | theme.border | --border |
plotColors | Chart series colors (Nx3 RGB matrix) | theme.plotColors | N/A (use chart library config) |
MATLAB note: Surface/text colors (--bg-primary, --text-primary in CSS) are NOT in the MATLAB theme struct. The R2025a Theme API handles those automatically. Only define brand/custom colors.
colors = [0 0.447 0.741; 0.85 0.33 0.10; 0.93 0.69 0.13; ...
0.49 0.18 0.56; 0.47 0.67 0.19; 0.30 0.75 0.93];
colororder(ax, colors);
% All series in this axes now cycle through these colors
function theme = createTheme(mode)
arguments
mode string {mustBeMember(mode, ["light", "dark"])} = "light"
end
theme.primary = [0 0.447 0.741]; % MATLAB blue
theme.onPrimary = [1 1 1];
theme.error = [0.83 0.18 0.18];
theme.success = [0.22 0.56 0.24];
theme.border = [0.88 0.88 0.88];
theme.plotColors = [0 0.447 0.741; 0.85 0.33 0.10; 0.93 0.69 0.13; ...
0.49 0.18 0.56; 0.47 0.67 0.19; 0.30 0.75 0.93; 0.64 0.08 0.18];
if mode == "dark"
theme.primary = fliplightness(theme.primary);
theme.plotColors = fliplightness(theme.plotColors);
end
end
Wiring to a figure:
fig.ThemeChangedFcn = @(src, ~) applyTheme(src, ax);
function applyTheme(fig, ax)
theme = createTheme(fig.Theme.BaseColorStyle);
colororder(ax, theme.plotColors);
end
ThemeChangedFcn to swap brand colors when OS/user toggles dark modefliplightness() to auto-derive dark brand colors from light definitionsColorMode = "auto" on components wherever possibleWhat breaks automatic theming — setting any color explicitly switches ColorMode to "manual":
btn.BackgroundColor = [0.2 0.4 0.8]; % Now manual — won't adapt to theme
btn.BackgroundColorMode = "auto"; % Restore theme control
| Type | API | When to use |
|---|---|---|
| Component colors | btn.BackgroundColor, lbl.FontColor | UI element branding |
| Series colors | colororder(colors) or colororder("palette") | Multiple lines/bars/scatter in one axes |
| Continuous colors | colormap(map) | Heatmaps, surfaces, contours, images |
| Cell/row styling | uistyle + addStyle | Conditional formatting in tables/trees |
colororder = categorical (series A, B, C get distinct colors)colormap = continuous (scalar values mapped to gradient)rgb = sscanf(hex(2:end), '%2x', 3)' / 255theme.primary, theme.secondary, etc.fliplightness() produces acceptable dark variants; override manually if notapplyBrandColors: the function reads the struct and sets tagged componentsSee references/external-schemes.md for complete Material Design, Adobe Color, and Tailwind import examples.
createTheme structfliplightness() used for dark variantsfindall lookupThemeChangedFcn wired to re-apply brand colorscolororder set from theme.plotColors| Problem | Cause | Fix |
|---|---|---|
| Component doesn't change with dark mode | Color set explicitly | Remove explicit color or set BackgroundColorMode = "auto" |
fliplightness not found | MATLAB < R2025a | Upgrade or define manual dark colors |
| Chart colors don't update on theme switch | colororder not re-applied | Add colororder(ax, theme.plotColors) to theme handler |
findall returns empty | Tag not set or misspelled | Verify Tag property matches exactly |
| Topic | File | Description |
|---|---|---|
| Theme API | references/theme-api.md | R2025a lock/detect/react, auto vs manual theming |
| Component colors | references/component-colors.md | Color properties table + uistyle for tables/trees |
| External schemes | references/external-schemes.md | Material Design, Adobe Color, Tailwind import workflows |
Copyright 2026 The MathWorks, Inc.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
matlab-theming, color-palette, dark-mode, chart-styling, uifigure
3 skills in this plugin
/matlab-build-appBuild MATLAB apps from requirements to working code. Asks discovery questions (or skips them when the path is known), recommends UIFigure or UIHTML architecture, identifies layout archetype (Dashboard, Explorer, Tabbed, Wizard, Canvas), produces an implementation plan, and executes the build. For UIFigure apps, optionally serializes as App Designer (.mlapp or plain-text .m + .xml). Use when a user wants to build a MATLAB app, create a GUI, make an interactive tool, build a uifigure app, build a uihtml app, build an App Designer app, build a .mlapp app, build a plain-text App Designer app, or asks which approach to use. Also use when user describes spatial layout needs: dashboard, control panel, sidebar, tabs, wizard, stepper, canvas, workspace.
/matlab-build-chartCreate and customize MATLAB charts and plots. Plot types (line, scatter, bar, histogram, heatmap, surface), axes configuration, annotations, data tips, interactive plots, animation, multiple axes with tiledlayout, colororder, and performance optimization. Works for standalone figures, Live Scripts, and uifigure apps. Use when plotting data, customizing axes, adding annotations or interactivity, animating charts, or arranging multiple axes. Triggers: plot, chart, graph, axes, uiaxes, annotation, data tips, animation, tiledlayout, colororder, heatmap, scatter, figure, visualization, export.
/matlab-app-building:matlab-apply-themefrom matlab-app-building
npx claudepluginhub matlab/matlab-agentic-toolkit --plugin matlab-app-buildingOther plugins' skills for the same job