matlab-apply-theme

Apply color palettes, brand theming, and dark mode to MATLAB charts and uifigure apps.

995|122|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-apply-theme
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matlab-apply-theme
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/matlab-app-building/matlab-apply-theme
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-apply-theme

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Styling MATLAB charts and apps consistently is error-prone: colors get scattered across code, colororder and colormap get confused, and manually set component colors break automatic dark mode adaptation. This Skill provides the conventions and APIs to centralize brand colors, style chart series, and implement theme-aware uifigure apps using the R2025a Theme API.

Core Features & Use Cases

  • Chart Series Colors: Set categorical palettes with colororder and continuous gradients with colormap, with clear guidance on when to use each.
  • R2025a Theme API for uifigure Apps: Implement dark mode with fliplightness, react to OS theme changes via ThemeChangedFcn, and avoid breaking automatic theming with explicit color settings.
  • Brand Color Organization: Centralize colors in a theme struct mapped to semantic tokens (primary, error, success, plotColors), and import external schemes like Material Design, Adobe Color, or Tailwind.
  • Use Case: You are building a MATLAB app that must follow company branding and support dark mode. Use this Skill to define a theme struct, wire ThemeChangedFcn, and apply conditional table styling with uistyle.

Quick Start

Ask your agent to apply a custom color palette to your MATLAB chart and add dark mode support to your uifigure app using the R2025a Theme API.

Frequently Asked Questions about matlab-apply-theme

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set custom colors for chart series in MATLAB?

Use colororder to set categorical series colors for lines, bars, or scatter plots in an axes. Pass an Nx3 RGB matrix, for example colororder(ax, colors), and all series in that axes will cycle through your palette.

How do I implement dark mode in a MATLAB uifigure app?

Use the R2025a Theme API: detect the current mode with fig.Theme.BaseColorStyle, react to changes with ThemeChangedFcn, and derive dark brand colors automatically with fliplightness. Avoid setting component colors explicitly, since that switches ColorMode to manual and breaks theme adaptation.

What is the difference between colororder and colormap in MATLAB?

colororder defines categorical colors for distinct chart series, while colormap maps continuous scalar values to a gradient for heatmaps, surfaces, and images. Confusing them is a common mistake since they serve different purposes.

Why does my MATLAB component not change color in dark mode?

Setting any color property explicitly switches the component's ColorMode to manual, disabling automatic theming. Remove the explicit color or set BackgroundColorMode to "auto" to restore theme control.

Can I import a Material Design or Tailwind color scheme into MATLAB?

Yes. Extract 5-7 key colors, convert hex values to normalized RGB with sscanf(hex(2:end), '%2x', 3)' / 255, and map them to a theme struct with fields like primary, error, and plotColors. Verify fliplightness produces acceptable dark variants.

Which MATLAB release is required for the Theme API?

The Theme API, including fliplightness and ThemeChangedFcn, requires MATLAB R2025a or later. On earlier releases you must define manual dark color variants instead of deriving them automatically.