MATLAB Theme Extensions enhance MATLAB’s built-in themes by enabling users to create, import, and share custom color schemes. This extension allows you to personalize your MATLAB environment and easily switch between different color schemes.
The project works by customizing colors on top of the existing MATLAB Themes (either Light or Dark).
- Download the project from MATLAB File Exchange or GitHub.
- Extract the zipped file to any directory on your system.
- Open MATLAB and navigate to the extracted project folder.
- Run the scripts (such as
import_scheme
orexport_scheme
) from within that directory to use the project's features.
- Import custom color schemes from JSON files stored under the schemes folder (e.g., the Cobalt scheme):
import_scheme('schemes/cobalt.json');
- Export your current color settings (including with the MATLAB Theme) to a JSON file:
export_scheme('exampleCustomColors.json');
-
Reset color settings by importing the default color schemes schemes/matlab-light.json and schemes/matlab-dark.json.
-
Validate custom scheme files:
validateJsonFile('pathtofile/customScheme.json');
Scheme files are JSON documents that must include a DesktopTheme
field and follow the structure of the provided template.json in this project. Customizable fields include:
- Background Color
- Text Color
- MATLAB Syntax Highlighting Colors
- Output Colors
- Programming Tools
- Syntax Highlighting for other languages such as C, Java, HTML, etc.
- Current Line Highlight
- Right-hand Text limit line
- Boolean fields to enable or disable specific customizations
The fields in the JSON file are inspired by MATLAB's Settings panel (previously Preference Panel), see MATLAB Toolstrip → Home → Settings
MathWorks Products (https://www.mathworks.com)
MATLAB R2025a or newer
See LICENSE.
If you have suggestions for color schemes or improvements, please create an issue or pull request. See CONTRIBUTING.
Copyright 2025 The MathWorks, Inc.