matlab.colors Settings
MATLAB syntax highlighting color settings for light theme
You can customize the colors for syntax highlighting for the light theme 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 Programmatically.
Note
These settings only apply for the light theme. To customize the colors for syntax highlighting for the dark theme, use the Settings window. For more information, see Change Desktop Theme and Colors.
matlab.colors
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]
Color of keywords, specified as a RGB triplet with values in the range [0,255].
Example: s.matlab.colors.KeywordColor.TemporaryValue = [173 235
255]
Color of strings, specified as a RGB triplet with values in the range [0,255].
Example: s.matlab.colors.StringColor.TemporaryValue = [173 235
255]
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]
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]
Color of comments, specified as a RGB triplet with values in the range [0,255].
Example: s.matlab.colors.CommentColor.TemporaryValue = [173 235
255]
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]
matlab.colors.commandwindow
Color of errors in Command Window and Live Editor output, specified as a RGB triplet with values in the range [0,255].
Example: s.matlab.colors.commandwindow.ErrorColor.TemporaryValue =
[255 0 0]
Color of warnings in Command Window and Live Editor output, specified as a RGB triplet with values in the range [0,255].
Example: s.matlab.colors.commandwindow.WarningColor.TemporaryValue
= [0 0 255]
Color of Command Window hyperlinks, specified as a RGB triplet with values in the range [0,255].
Example: s.matlab.colors.commandwindow.HyperlinkColor.TemporaryValue
= [173 235 255]
matlab.colors.programmingtools
Color of Code Analyzer warnings, specified as a RGB triplet with values in the range [0,255].
For more information about the Code Analyzer, see Check Code for Errors and Warnings Using the Code Analyzer.
Example: s.matlab.colors.programmingtools.CodeAnalyzerWarningColor.TemporaryValue
= [0 255 0]
Color of Code Analyzer info messages, specified as a RGB triplet with values in the range [0,255].
For more information about the Code Analyzer, see Check Code for Errors and Warnings Using the Code Analyzer.
Example: s.matlab.colors.programmingtools.CodeAnalyzerInfoColor.TemporaryValue
= [0 255 0]
Highlight Code Analyzer autofixes, specified as 1
or
0
.
Set to 1
to highlight code in the Editor and Live
Editor for which there is an automatic fix.
For more information about the Code Analyzer, see Check Code for Errors and Warnings Using the Code Analyzer.
Example: s.matlab.colors.programmingtools.HighlightAutofixes.TemporaryValue
= 0
Color of Code Analyzer autofix highlight, specified as a RGB triplet with values in the range [0,255].
HighlightAutofixes
must be set to 1
to see the change in the autofix highlight.
Example: s.matlab.colors.programmingtools.AutofixHighlightColor.TemporaryValue
= [0 255 0]
Automatically highlight variables and functions, specified as
1
or 0
.
Set to 1
to highlight all occurrences of a specific
variable or function in the Editor and Live Editor.
For more information about using automatic highlighting to find and replace functions or variables in the current file, see Find and Replace Text in Files and Go to Location.
Example: s.matlab.colors.programmingtools.AutomaticallyHighlightVariables.TemporaryValue
= 0
Color of variable and function highlight, specified as a RGB triplet with values in the range [0,255].
AutomaticallyHighlightVariables
must be set to
1
to see the change in the variable and function
highlight.
Example: s.matlab.colors.programmingtools.VariableHighlightColor.TemporaryValue
= [255 232 0]
Show variables with shared scope, specified as 1
or
0
.
Set to 1
to show variables with shared scope using a
specific color.
For more information about displaying variables with shared scope, see Check Variable Scope in Editor.
Example: s.matlab.colors.programmingtools.ShowVariablesWithSharedScope.TemporaryValue
= 0
Color of shared scope variables, specified as a RGB triplet with values in the range [0,255]. The text is colored, not shaded.
ShowVariablesWithSharedScope
must be set to
1
to see the change in the color of shared scope
variables.
Example: s.matlab.colors.programmingtools.VariablesWithSharedScopeColor.TemporaryValue
= [173 235 255]
Version History
Introduced in R2018b