File Exchange Pick of the Week

Our best user submissions

This is machine translation

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

What’s Your Color Scheme? 3

Posted by Brett Shoelson,

Brett‘s Pick this week is MATLAB Schemer, by Scott Lowe.


Easy manipulation of your MATLAB color scheme!

I’m curious: what color scheme do you use when you write code in MATLAB? Do you stick with the default, or have you customized the colors in your editor? And are those of you who use Linux more likely to use light text on a dark background than are those of use who work in Windows?

MATLAB is customizable!

Did you know that you can easily change the colors of your text in MATLAB? In the Preferences dropdown from the Home tab, you can specify the colors of text, background, keywords, strings, comments, errors, hyperlinks, warnings, etc. Check out: Preferences->Colors to see what I mean:

If you want to change the defaults for any reason–to mitigate eye strain, to help with color-blindness issues, or just to create a more pleasing environment, you can do that! (And if you like the defaults, you can keep them, too!)

I confess: I have been using MATLAB for so long that the default color scheme seems “right” to me, with one exception. Since I often share my screen with others, I find that the default pale yellow for section highlighting doesn’t work well for me, and I have changed mine in my preferences to be a light cyan; I think it’s easier to see.

That said, the ease with which I can change my color schemes using Scott’s “Schemer” code has me rethinking my preferences…. or at least, considering alternatives. To start, I Googled “preferences for coding color schemes,” and found lots of discussions about the topic. Many people indicated that they liked the “monokai” scheme. So I simply executed the command:


and launched a file selector. Browsing to Scott’s directory of pre-saved schemes, I selected “monokai.prf,” and voila! my text changed to white on a black bacground; strings changed to a pale yellow, highlights changed to blue,…. you get the point!

Scott provided “monokai” and about 10 other color schemes.

If you’ve spent any time customizing your own, please remember to save them:


before you change things!

This is very useful, though; I get to kick the tires before I buy the car, and I can easily return the car after I’ve bought it if I decide that I don’t like it!

Very nice work, Scott! (It’s evident that many others agree; Schemer has been downloaded 35,000 times [as of this writing]–including nearly 1400 downloadsthis month–and has 213 ratings averaging 5 stars [out of 5]!) Outstanding!

As always, I welcome your thoughts and comments.

Get the MATLAB code

Published with MATLAB® R2019a

3 CommentsOldest to Newest

Ander Biguri replied on : 1 of 3
The schemer is great! However it has a drawback, and its not Scott's fault. I dare to say that most users want to it set up a dark scheme. However, there are a lot of things that can not get the color changed, such as the line numbers in the scripts, or side bars, and generally all the frames around all the objects in the GUI. This means that while you can set up a dark scheme, they are quite ugly, and I personally find the white borders distracting, comparing to most of the other profesional text editors in the market. Request to MATLAB: let us change the color of those things too! the MATLAB GUI is great, but needs some updating!
Brett Shoelson replied on : 3 of 3
@Ander: Very good feedback--thank you! I have shared it with our Development team. Brett

Add A Comment

Your email address will not be published. Required fields are marked *

Preview: hide