Why is the menu bar background white?

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 comentarios

Torsten
Torsten el 2 de Feb. de 2026
Editada: Torsten el 2 de Feb. de 2026
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 el 2 de Feb. de 2026
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?

Iniciar sesión para comentar.

Respuestas (2)

Matt J
Matt J el 2 de Feb. de 2026

0 votos

especially when you develop a code with a GUI
For GUIs, you can use uimenu, which still produces a grey menu bar.

3 comentarios

Luc
Luc el 3 de Feb. de 2026
Of course I use uimenu for my app. But on my computer it produces a white menu bar. That is very odd.
In a GUI, you would normally use a uifigure, which should be grey:
uimenu(uifigure,'Text','&My File')
Luc
Luc el 3 de Feb. de 2026
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.

Iniciar sesión para comentar.

Matt J
Matt J el 3 de Feb. de 2026

0 votos

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 comentarios

Luc
Luc el 3 de Feb. de 2026
Great! I will check Matlab 2025b then.
Thanks a lot Matt.
Matt J
Matt J el 3 de Feb. de 2026
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.

Iniciar sesión para comentar.

Categorías

Más información sobre Environment and Settings en Centro de ayuda y File Exchange.

Productos

Versión

R2024b

Preguntada:

Luc
el 2 de Feb. de 2026

Comentada:

el 3 de Feb. de 2026

Community Treasure Hunt

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

Start Hunting!

Translated by