Why is the menu bar background white?

61 views (last 30 days)
Luc
Luc on 2 Feb 2026 at 8:35
Commented: Matt J on 3 Feb 2026 at 19:25
When I create a figure (using figure func), the menu bar background is white. Is there a way to change this? It seems that this could be Windows dependent since, on another computer, the menu bar is grey as expected.
  2 Comments
Torsten
Torsten on 2 Feb 2026 at 10:58
Edited: Torsten on 2 Feb 2026 at 11:07
Answer from AI:
To change the MATLAB desktop menu bar/toolstrip background color, navigate to Home > Environment > Preferences > MATLAB > Appearance > Colors and adjust the theme. For GUI applications, use set(gcf, 'Color', 'k') to change the figure background color, or set(0, 'DefaultFigureColor', 'k') for all figures.
Key Details for Changing MATLAB Appearance:
  • Desktop Theme (R2025a and later): Go to Preferences -> MATLAB -> Appearance -> Colors to change theme colors, such as setting a dark background.
  • Desktop Theme (Before R2025a): In Preferences -> MATLAB -> Colors, clear "Use system colors" to customize desktop tool colors.
  • GUI Figure Backgrounds: Use set(gcf, 'Color', [R G B]) for specific figures or set(0, 'DefaultFigureColor', 'w') to change the default color for all new figures.
  • Toolbar UI Component: Use tb = uitoolbar(fig); tb.BackgroundColor = [0.5 0.5 0.5]; to customize specific toolbar component colors.
  • Simulink Background: In the Format tab, select a color from the Background menu to change the model canvas color.
If you are trying to make the entire MATLAB desktop interface dark (including the top menu bar/toolstrip), this is currently limited to the official Dark Theme setting in Preferences, as comprehensive UI customization is not supported.
And here is the MATLAB page:
Luc
Luc on 2 Feb 2026 at 11:40
I am talking about the menu bar, not the figure background color or the command window. In the Matlab figure, on the right side of the Help menu, the background is white. Visually that is not good, especially when you develop a code with a GUI. FYI, the menu bar background in R2022b is completely white.
So, my question is: can we get rid of that?

Sign in to comment.

Answers (2)

Matt J
Matt J on 2 Feb 2026 at 19:39
especially when you develop a code with a GUI
For GUIs, you can use uimenu, which still produces a grey menu bar.
  3 Comments
Matt J
Matt J on 3 Feb 2026 at 12:44
In a GUI, you would normally use a uifigure, which should be grey:
uimenu(uifigure,'Text','&My File')
Luc
Luc on 3 Feb 2026 at 13:49
Ok. It works properly with uifigure. But I use figure for my GUI application, given the fact that I started working on it a long ago.

Sign in to comment.


Matt J
Matt J on 3 Feb 2026 at 16:05
You could also upgrade to R2025. There, the menu bar is grey (or at least not as white)
and you can also render figures in dark theme:
  2 Comments
Luc
Luc on 3 Feb 2026 at 16:56
Great! I will check Matlab 2025b then.
Thanks a lot Matt.
Matt J
Matt J on 3 Feb 2026 at 19:25
You're welcome, but if/when you are satisfied that this resolves the problem well enough, and that there are no better solutions, please Accept-click the answer.

Sign in to comment.

Categories

Find more on Environment and Settings in Help Center and File Exchange

Products


Release

R2024b

Community Treasure Hunt

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

Start Hunting!