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
SyntaxErrorColor
— Color of syntax errors
[255 0 0]
(default) | RGB triplet
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
[14 0 255]
(default) | RGB triplet
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
[170 4 249]
(default) | RGB triplet
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
[178 140 0]
(default) | RGB triplet
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
[196 0 0]
(default) | RGB triplet
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
[2 128 9]
(default) | RGB triplet
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
[160 82 45]
(default) | RGB triplet
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
ErrorColor
— Color of errors in output
[230 0 0]
(default) | RGB triplet
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]
WarningColor
— Color of warnings in output
[255 100 0]
(default) | RGB triplet
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]
HyperlinkColor
— Color of Command Window hyperlinks
[0 0 255]
(default) | RGB triplet
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
CodeAnalyzerWarningColor
— Color of Code Analyzer warnings
[255 148 0]
(default) | RGB triplet
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]
HighlightAutofixes
— Highlight Code Analyzer autofixes
1
(default) | 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
AutofixHighlightColor
— Color of Code Analyzer autofix highlight
[238 225 180]
(default) | RGB triplet
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]
AutomaticallyHighlightVariables
— Automatically highlight variables and functions
1
(default) | 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
VariableHighlightColor
— Color of variable and function highlight
[202 232 232]
(default) | RGB triplet
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]
ShowVariablesWithSharedScope
— Show variables with shared scope
1
(default) | 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
VariablesWithSharedScopeColor
— Color of shared scope variables
[0 163 163]
(default) | RGB triplet
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