Simulink colors inconsistent with dark desktop color scheme
22 views (last 30 days)
Show older comments
I'm using Matlab 2019b on Linux. My desktop color scheme is dark (KDE/Qt), so mostly light text on dark background. Simulink tries to match that for parts of the user interface, which is nice, but it doesn't get it quite right. I get light text on light background and dark text on dark background in some places, which is near unreadable or entirely unreadable (see screenshot, notice the search box, the dropdown menu with search results as well as the navigation bars on top and left of the canvas).

I don't really care too much whether simulink matches my desktop colors or not, but I don't want to change my desktop colors and I would like readable text in Simulink. Simulink appears to have no color scheme settings and is unaffected by color scheme settings in MATLAB.
3 Comments
Loïc Alexandre
on 8 Oct 2023
Moved: Adam Danz
on 15 May 2024
Still the same problem for me with matlab 2023b. Have you found a solution ?
Answers (1)
Franklin Ronald
on 15 May 2024
Hi.
I'm using environment variables to set a light theme to MATLAB only.
XDG_CURRENT_DESKTOP=GNOME
GTK_THEME=Adwaita:light
And Simulink is light but usable.

2 Comments
Devin
on 18 Mar 2025
Hi all,
This fix does work great but if you launch MATLAB through the GUI like I do you can apply this fix permanetly by editing MATLAB's .desktop file.
Find MATLAB’s .desktop file (Usually in /usr/share/applications/matlab.desktop or ~/.local/share/applications/matlab.desktop).
Edit it using a text editor:
nano ~/.local/share/applications/matlab.desktop
Find the line starting with Exec= and modify it like this:
Exec=env XDG_CURRENT_DESKTOP=GNOME GTK_THEME=Adwaita:light matlab -desktop
depending on how your .desktop is set up it may be the directory to the MATLAB launcher and in that case, put
env XDG_CURRENT_DESKTOP=GNOME GTK_THEME=Adwaita:light
before the dierctory like so.
Exec=env XDG_CURRENT_DESKTOP=GNOME GTK_THEME=Adwaita:light /usr/local/MATLAB/R2024b/bin/matlab -desktop
Save and exit, then refresh the desktop database:
update-desktop-database ~/.local/share/applications
Now, MATLAB should always launch with these environment variables, even from the GUI.
Martino
on 3 Jun 2025
Hello, I can confirm that the issue is still present on Fedora 42 (KDE 6.3.5) with MATLAB 2025a.
Forcing the default Gnome GTK theme for MATLAB by adding these environment variables to the .desktop file is still a good workaround
XDG_CURRENT_DESKTOP=GNOME GTK_THEME=Adwaita:light
(although we shouldn't still need to use a workaround after 5 years of this issue being reported).
See Also
Categories
Find more on Interactive Model Editing 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!