Change Color Scheme for App Designer Editor
Show older comments
I prefer to edit code with a high-contrast color scheme since looking at a white screen for a long time makes my retinas burn. It is easy enough to change the coloring preferences for MATLAB through Home\Preferences\Colors. However, the editing enviroment for App Designer seems to be somewhat independant from theses settings. While the text color changes appropriately, the background color seems to be locked as white. There also doesn't seem to be any preferences specific to App Designer either. Having Windows set to a high-contrast theme doesn't do the trick either.
Is there a way to adjust the background color for the App Designer editing enviroment (Code View), or am I just stuck with white?
5 Comments
Adam Danz
on 23 Sep 2019
I haven't looked into the preference settings regarding app designer but it's fairly easy to set the colors from with you the startupFcn() of your app. For example, this line below sets the app background as gray (where myGUIFigure is the main handle to your app).
Note that you'll have to change the color of all panels, and other objects since this line only changes the app background.
If this is something you needed to do for several apps, it would be straightforward to write an app theme function that takes an app handle as an input and then searches for all possible app components, changing their colors according to a theme. This would be called from the startupFcn().
app.myGUIFigure.Color = [.5 .5 .5];
Christopher Walsh
on 23 Sep 2019
Ah, that I know nothing about. A brief search resulted in these potential leads but you may have stumbled upon them already.
Christopher Walsh
on 23 Sep 2019
If you have a functional example of a property not behaving according to documentation, report it to tech support
If you find a solution, it would be helpful to lots of people if you share that as an answer below.
Accepted Answer
More Answers (1)
Christopher Walsh
on 24 Sep 2019
6 votes
6 Comments
Dmitry Timchenko
on 13 Oct 2020
And, one year and two versions later, situation is the same. Though to implement it costs 5-10 lines of code.
Stephan Brumme
on 20 Oct 2020
Yes, this is really annoying. And the most stupid thing is, that all other colors are changed along with the preferences of the normal editor... why? just why?
Andy
on 26 Jan 2021
A really wish the App Designer code editor would just follow the color scheme for the normal Matlab editor. I can't read it with all of the font colors intended for a black background.
Scott
on 26 Jan 2021
Agreed. I code in the regular (non-app designer) window in a light text on dark background (thanks to Scott Lowe), but there's no such animal for app designer. It's even worse now that I have that setup for the other editor, b/c now the highlights in app designer (on the white background) are even more difficult to read:

I can't tell you how much better that screen shot looks than in real life.
while this_solution_does_not_exist
fprintf('Please add support for this Mathworks! :)')
if this_solution_does_not_exist == false
celebrate('beer');
break;
end
end
Daniel Harvey
on 23 Mar 2021
Anyone found a workaround for this yet?
IanH
on 2 Apr 2022
The 'Read-only background' color can be changed in Preferences, at least as of R2021a.
Preferences > MATLAB > App Designer
See MATLAB documentation "Manage Code in App Designer Code View" subsection "Personalize Code View Appearance" for more details.
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
