This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Class: ModelAdvisor.Text
Package: ModelAdvisor

Specify text color


setColor(text, color)


setColor(text, color) sets the text color to color.

Input Arguments

textInstantiation of the ModelAdvisor.Text class

Color of the text, specified as one of the following formatting options:

  • 'normal' (default) — Text is default color.

  • 'pass' — Text is green.

  • 'warn' — Text is yellow.

  • 'fail' — Text is red.

  • 'keyword' — Text is blue.


t1 = ModelAdvisor.Text('This is a warning');
setColor(t1, 'warn');
Was this topic helpful?