This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

matlab.colors Settings

MATLAB syntax highlighting color settings

You can customize the colors for syntax highlighting using the matlab.colors settings. Access matlab.colors settings using the root SettingsGroup object returned by the settings function. For example, set the temporary value for the color of comments to [173 235 255] (light blue).

s = settings;
s.matlab.colors.CommentColor.TemporaryValue = [173 235 255]

For more information about settings, see Access and Modify Settings.

matlab.colors

Change the colors for highlighting syntax elements using these settings.

SettingDescription
SyntaxErrorColor

Color of syntax errors, specified as a RGB triplet with values in the range [0,255].

Example: s.matlab.colors.SyntaxErrorColor.TemporaryValue = [173 235 255]

KeywordColor

Color of keywords, specified as a RGB triplet with values in the range [0,255].

Example: s.matlab.colors.KeywordColor.TemporaryValue = [173 235 255]

StringColor

Color of strings, specified as a RGB triplet with values in the range [0,255].

Example: s.matlab.colors.StringColor.TemporaryValue = [173 235 255]

SystemCommandColor

Color of system commands, specified as a RGB triplet with values in the range [0,255].

Example: s.matlab.colors.SystemCommandColor.TemporaryValue = [173 235 255]

UnterminatedStringColor

Color of unterminated strings, specified as an RGB triplet with values in the range [0,255].

Example: s.matlab.colors.UnterminatedStringColor.TemporaryValue = [173 235 255]

CommentColor

Color of comments, specified as a RGB triplet with values in the range [0,255].

Example: s.matlab.colors.CommentColor.TemporaryValue = [173 235 255]

ValidationSectionColor

Color of validation sections, specified as a RGB triplet with values in the range [0,255].

Example: s.matlab.colors.ValidationSectionColor.TemporaryValue = [173 235 255]

Introduced in R2018b