Predefining colors for in-text coloring

25 views (last 30 days)
Hi all
I am using the latex approach to coloring segments of e.g. a title. For example:
title('{\color{red}this is red} and {\color{blue}this is blue}')
However, it appears that only 8 predefined colors are available automatically in Matlab. How do I expand this number, or ideally predefine color names using rgb codes myself?

Accepted Answer

Jakob Sievers
Jakob Sievers on 25 Jun 2014
Repeated googling led me to this solution
{\color[rgb]{1 .5 .2}text}
Jakob Sievers
Jakob Sievers on 25 Jun 2014
Thanks. I should have written it in full form :)

Sign in to comment.

More Answers (1)

Image Analyst
Image Analyst on 25 Jun 2014
Why don't you just try the 'Color' option and put in RGB colors inthe range 0-1
title('This is the title', 'Color', [0.1, 0.3, 0.5]);
  1 Comment
Jakob Sievers
Jakob Sievers on 25 Jun 2014
Because I need to color individual segments of the title in different colors. :)

Sign in to comment.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!