Ideas
Follow


Mathworks: it's time for a dark theme.

Antonello Zito on 14 Mar 2022
Latest activity Reply by Taha on 27 Feb 2024

This is not a question, but a point of discussion for the entire community. I am aware that every 1/2 months this theme comes out, but until this is not fixed it is totally necessary that this comes, indeed, out. And I said "fix" because Mathworks has to understand that a dark theme is not only a visual/aesthetic matter, it is a substantial part of the game. Most of the OS, GUIs, programs are actually in dark mode, and a vast majority of the users makes indeed use of a global dark mode. How much one does like it is personal, but the benefits to power savings and eye health is instead a fact. Mathworks being ignoring this for years is nothing but ridiculous. Of course it is not an easy task, but every minute of committment for it is worthy. And nope, Schemer is not helpful because it does not provide a real fix to this question.
I feel free to suggest something similar to the Spyder's dark theme, which came out like 2 years ago if I remember correctly.
Of course, my point is not being disrespectful (I am instead very respectful to the huge efforts of Mathworks for making this wonderful program run). But, form a user's point of view, the fact that not a single word has so far come out from Mathworks about a dark theme (meaning that for sure we will not see it in a timing of months) requires us to put a strong pressure on this.
Mathworks, please: it's time for a dark theme.
Taha
Taha on 27 Feb 2024
install CareUEyes app turn dark mode(MagicX) on matlab session , worked for me but this temp way not fixing anything...
hope you like it.
dark theme matlab
Taha
Taha on 27 Feb 2024
yeap as i said it is not solution, even this methods has disadvantages, such as reducing the quality of textures or color inversion but good for people who cares about their sight.
DGM
DGM on 27 Feb 2024
This is similar to the method I've been using for years, though I think it's worth pointing out that there are drawbacks to inverting the display (or selected windows), depending on what sort of tasks you do in MATLAB.
That said, I've been doing it so long that I almost get confused when see non-inverted syntax highlighting.
Walter Roberson
Walter Roberson on 31 Jan 2024
I do not like dark theme; I find it to be hard on my eyes.
Rik
Rik on 31 Jan 2024
That is factually incorrect. You have a preference, and apparently that is shared by those around you.
I also prefer a dark theme, but at least I have the humility to know that my preference isn't universal truth.
Your claim that every single developer prefers it isn't actually proof. I personally know a dev who prefers dark mode for once language and light mode for another. So even if I take you literally, you're wrong.
Mateusz Jaskulski
Mateusz Jaskulski on 31 Jan 2024
@Rik, dark theme is better. The proof is every single developer preferring it.
Rik
Rik on 19 Dec 2023
@Douglas What a convincing argument. Now you've completely convinced me. /s
What exactly is the point of your comment? You don't explain in what sense a dark theme is better. There are rare cases where a dark theme is objectively better, but in the overwhelming majority of the cases it is simply preference.
Douglas Novaes
Douglas Novaes on 19 Dec 2023
Dark theme is better.
Mike Croucher
Mike Croucher on 17 Mar 2023
Andrew Janke
Andrew Janke on 18 Mar 2023
Heck yeahhhh, time to hit that Download button and start filing minor bug reports.
Thanks for making this happen! I can't tell you how many people will be excited about this.
Antonio Pierrottet
Antonio Pierrottet on 17 Mar 2023
I prefer dark theme because I do programing at night. aside from the eye strain it is nice to be able to look away from the screen and stil see things in low light.
With that, it should be pointed out that dark theme should be an option not maditory. Your tesla would more acuratly be that antonello wants the right to have a tessla. Mathworks says here are the parts, put it together. That is a far cry from everyone must have it. It's that, for a well designed program, it's a little strange that a dark theme hasn't been made. Especialy considering that Matlab has been around for decades.
Walter Roberson
Walter Roberson on 1 Mar 2023
OLED is more expensive and does not last as long, so is the lower cost of running black pixels important over the lifetime of the product?
especially when a great deal (even if it is not the proven majority) of the userbase is asking for it.
Is "a great deal of the userbase" asking for it? Or is there just a fragment that is being very vocal about it?
the bright white light strains your eyes (I know it does mine) and inhibits your sleep later
The problem is not white light: the problem is blue light. https://www.viewsonic.com/library/business/blue-light-filter-eye-strain/ . White light does include blue light, but Preferences -> MATLAB -> Colors -> MATLAB Colros PReferences -> Desktop tool colors. untick Use system colors and use a different background color. And set(groot, 'DefaultAxesColor', COLOR) so that you do not get white plot backgrounds. White light problem mostly solved.
I would also point out that if you are using MATLAB on your phone, that you would be using MATLAB Mobile, not MATLAB itself.
I think asking for proof for the arguments that started the thread is a bit of a weak defense argument.
Suppose that you lived in my city and you claimed that it was a "must have" for the city to convert all of its vehicles to Tesla, and you ranted about how much the city was letting down the residents by not already having switched to Tesla a few years ago. Would it really be so unreasonable for me to ask you to prove the "must" part? (I live in the second coldest "large" city in the world by the way.)
Rik
Rik on 1 Mar 2023
There actually is a cost to non-users of a feature: an engineer can only spend time once, so there is a limited number of features that can be implemented. Any feature you don't use still has to be created and might cause a feature you would have used from being created.
That being said, I am in favor of a proper dark mode. I just object to people crying wolf. If you have a medical reason (or even just a preference) for a dark background, you can already get most of the way there. So I just don't see why some people are acting as if they are being forced to stare right into a white on white screen at maximum brightness.
If you need to exaggerate your opinion, you are apparently not convinced it is that good of an argument.
Raul Villanueva
Raul Villanueva on 1 Mar 2023
wow, this was a fun read... and I mean the comments. I've been reading this kind of threads for years now and I too have been patiently and silently waiting for a dark mode. Why? Well, the quick answer is "because I like it". In the end, MATLAB, like most software out there, is a consumer-based product and "the consumer likes it" is more than enough reason to implement a feature. I must say the stubborness and close-mindedness of the MVPs that commented here is the thing that actually surprised me about this thread. And I mean no offense to them whatsoever. I've gotten so much help over the years reading their responses to several topics and I am really grateful. I do think, though, that a "if it's not broken, why fix it?" mentality is not what drives any kind of product forward, especially when a great deal (even if it is not the proven majority) of the userbase is asking for it. So I ask the skeptics: If the feature is there (for all those who do want it), how is that going to negatively affect you? I would think the answer is "in no way whatsoever". So, why push back against it?
Now, deepening a bit into the reasons for such a feature, I think asking for proof for the arguments that started the thread is a bit of a weak defense argument. Any quick internet search may yield different opinions about the topic regarding eye strain. But just think about you using your phone at night, or watching a movie late, even if you are not in bed, the bright white light strains your eyes (I know it does mine) and inhibits your sleep later. People then wonder why they suffer from insomnia. We've been using screens for less than a century so there's no way we have evolved to have such bright artificial lights in our faces day and night. Furthermore, many of the new screen technologies, such as AMOLED use less energy for darker colors, as developers explained early on with their "true-blacks". So that one is also a no-brainer.
Like I sad, no offense to anyone. On my side, I am still patiently waiting. In the meantime, I use schemer and I am happy working with it. But there is room for improvement in that front, and as a consumer, I would really like to see it implemented.
DGM
DGM on 13 Dec 2022
As someone who still stubbornly, spitefully expects apps to respond to GTK2 settings, I still gotta side with Rik. I was literally legally blind (20/400) and solved the problem without TMW needing to further reduce the app to an embedded web browser.
Rik
Rik on 13 Dec 2022
I have a hard time believing someone actually suffers from the light theme, but did not dig into the settings to adjust the colors to get fairly close to a dark theme. I just don't understand how those two things would go together.
Pavel Krupets
Pavel Krupets on 13 Dec 2022
100% my poor eyes are bleeding...
John Kelly
John Kelly on 1 Nov 2022
We (MathWorks) have removed the previous information in this Answer, origianlly posted by @Nicolai Lamp, because the instructions were about how to access the JSD software, which is still in beta stages, on our public site. If anyone wants more information about how to try out the JavaScript Desktop beta software, we'd love to engage with you directly. Please refer to @Michelle Hirsch's response below for information about how to participate in the beta.
Or you can sign up here and the team will reach out to you:
Nicolai Lamp
Nicolai Lamp on 1 Nov 2022
@Michelle Hirsch Thanks for the mention of the beta program, I didn't know that was an option. I just stumbled upon the flag somewhere online and thought it might be worth it to pass it on.
Michelle Hirsch
Michelle Hirsch on 27 Oct 2022
Good find, @Nicolai Lamp! We are very excited to have you and others try out the new desktop. But I'd like to ask that you go through our official channel of signing up for our beta. The directions we provide are a little easier and give a better experience. You'll get buttons right in the desktop to enable/disable the new desktop and to provide feedback. This feedback mechanism is especially important to us, so we know what's working well for you and what else you'd like to see.
Sign up here with the email address associated with your MathWorks accountand the team will reach out to you:
Nicolai Lamp
Nicolai Lamp on 26 Oct 2022
@cui Yes, the matlab documentation is by default installed & stored locally for offline referencing, it can be controlled in the settings weather or not it will search local or online documentation, so the documentation itself is not the issue, since that can just be opened in a browser with a darkmode plugin to adapt the colors.
Bennett Russell
Bennett Russell on 25 Oct 2022
@Nicolai Lamp Thanks for posting this solution. My eyes owe you a great deal.
Rik
Rik on 5 Jul 2022
While setting up default colors is indeed a bit involved for the casual user, getting 90% of the way there by using Matlab Schemer takes very little time and very little skill. Otherwise it is as simple as opening the settings dialog and picking colors you like.
George Howell
George Howell on 5 Jul 2022
@Walter Roberson and @Jan: I see where you are both coming from but I disagree.
I said the same about voice control, its a gimmick that doesn't generally work well and definitely not a must have, however for people who are visually impaired, any kind of voice control is a must have. For accessibility, it is like having the bumps on the pavement at a traffic light (here in the UK), no use to me, but vital for someone else.
I think the same applies here. I'm mildly dyslexic and dark mode really does help my eyes. My brother has dyslexia far worse and he has to basically read everything that is black text on a white background wearing orange tinted glasses. This is not the case with dark mode apps, and this feature has helped him immensely.
@Jan "I'm still wondering, what the problem is. I wanted a dark view, so I've installed the dark theme from the file exchange. I've written a function to control default colours in my GUIs and diagrams, so I have full control over the style."
I think you've just highlighted the problem! While you have clearly set up a good solution, you and WR are Level 10, I'm sure it would take me and others a fair bit longer to get to this point, and quite honestly, while I love Matlab, I much prefer to spend my time learning DSP algorithms than messing around setting a dark mode theme on Matlab.
That's just my opinion though ...
Jan
Jan on 7 Jun 2022
I can reconsider, why you do not miss a dark theme. Working on a DEC_VT50 is comparable with running Matlab on a monochrome Apple iWatch.
Walter Roberson
Walter Roberson on 7 Jun 2022
I am not positive, but the first display I used might have been a DEC VT-50 https://terminals-wiki.org/wiki/index.php/DEC_VT50
Jan
Jan on 7 Jun 2022
I'm still wondering, what the problem is. I wanted a dark view, so I've installed the dark theme from the file exchange. I've written a function to control defaul colors in my GUIs and diagrams, so I have full control over the style. The only remain non-dark object is the border around the command window and editor and this does not hurt me.
And if I write a tool for controlling colors, I've implemented a flower, sad gray, a fresh green and a red hot chili theme also, so I had some fun.
I've started programming with an amber-on-black monitor in the 1980th. Therefore I do not think, that a dark-theme is a modern must-have, but just a fashion which I like.
Walter Roberson
Walter Roberson on 6 Jun 2022
I disagree with the fundamental premise that this is a "must have" feature, except perhaps as a disability accommodation. People are welcome to reply to my Answer with evidence (not just assertion) that the feature is indeed "must have".
For example feel free to present studies showing that on display technology in non-trivial use, that it saves appreciable amounts of electricity. (The amount of MATLAB code that is run on extremely specialized mixed analog and digital radar tracking station displays is surely near zero.)
M Herper
M Herper on 6 Jun 2022
Matlab is going to loose market share without hearing the customers voice related to a dark theme. This is indeed a must-have feature and nobody understands that Mathworks is ignoring this since years.
Lukas
Lukas on 4 May 2022
I will make it shorter: Yes, a full dark mode also encompassing the UI and the window frames is a must-have and a standard for any free software.
Rana Hamza
Rana Hamza on 30 Apr 2022
It depends on you to change the theme as you can do it in setting.
because in light theme eyes can gambling
Tim Holden
Tim Holden on 19 Apr 2022
Thank you so much for the update. Dark mode would be extremely beneficial as I work with MATLAB a lot.
Michelle Hirsch
Michelle Hirsch on 1 Apr 2022
UPDATE March 17, 2023: Try dark mode by installing the beta of the New Desktop for MATLAB, available for R2023a. Just search for New Desktop for MATLAB in the Add-On Explorer, or download and install from here on the File Exchange.
---------------------------- Original Answer from April 1, 2022 (no joke!) --------------------
Hey, it's Michelle Hirsch here. I'm the head of product management for MATLAB. The fancy title means I'm the one you can yell at or poke with a stick, because it's my job to make sure we are doing the best we can to meet your needs with MATLAB.
I'm sorry we've been so quiet on dark mode. I want to let you all know it's not for lack of focus on it. We've been well aware of escalating demand over the past many years from so many of you. This demand really ticked up when Mac and Windows integrated dark themes at the OS level. It is taking much longer for us to enable our full product stack than I had hoped.
There are a bunch of pieces to get in place (editor, graphics, apps, icons, desktop, ...) and you are seeing incremental signs of our progress along the way. One small step was control over Live Editor background color in 22a. Dark mode support in MATLAB Online in 22a represents a major step forward (from a technology perspective) with the desktop framework and icons in place.
We currently use two different technologies to build the MATLAB Online desktop and the desktop MATLAB desktop (how many times can I say desktop!), which is why the work we did for MATLAB Online isn't helping desktop MATLAB users yet. We are working furiosuly to move everything over to the technology used in MATLAB Online. Once we do, we'll get proper dark theme support in desktop MATLAB. This is a massive project with the potential to change aspects of how you use MATLAB, so we are proceeding carefully with lots of what we call "user acceptance testing" to make sure we are building something you all will love. We plan to make previews of this technology available to more and more users as we have increasing confidence that you'll love it. I can't put a firm release date on when this will be ready for every MATLAB user. We set release targets internally, but we only release software when it meets our quality and user acceptance standards.
I hope you'll accept my apology for our silence and for the insufficient progress. I'm trying to give you a "peek behind the curtain", not to make excuses. I know we are not meeting your expectations. I want to leave you with the confidence that a whole bunch of us at MathWorks are doing everything we can to get proper dark mode support in your hands as soon as we can.
I'd love your help if you are interested and willing. We will be looking pretty soon for users who would like to test out early versions of the new MATLAB desktop based on the MATLAB Online version. If you are interested, the easiest way is probably to send me an email. You can go through my MATLAB Central profile, or just email me directly at mhirsch at mathworks dot com. We are also looking for guidance from users on how dark mode should behave in MATLAB. It's not as obvious as you might think, especially when you consider plots and apps. One simple example: if you are just working interactively, you probably expect your plots to all have a dark background and appropriately light line colors. But if you are programmatically creating and exporting a bunch of plots, you probably want them to have "normal" light background and colors. We need to get our default behaviors right and give you the ability to override them if you want somethihng different. Feel free to share opinions here or drop me a line.
madhan ravi
madhan ravi on 2 Jan 2024
Thanks for the update Abby!
Abby Skofield
Abby Skofield on 2 Jan 2024
@Ryan Budde - yes, starting in R2023b Update 3, the New Desktop for MATLAB Beta includes dark theme support for apps and plots! We're excited to hear what you think of this feature. It is not documented as it is in Beta development, but there are some code snippets for reference on the Beta page.
As you note, you can set a specific theme on a single figure using the Theme property, e.g. fig.Theme = 'light'. If you would like to change the automatic behavior for all figures in a MATLAB session, please use the GraphicsTheme preference as shown below. The value of this preference is 'auto' by default, and it can be configured to 'light' or 'dark'.
s = settings;
s.matlab.appearance.figure.GraphicsTheme.PersonalValue= 'light'; % PersonalValue persists after restarting MATLAB
s.matlab.appearance.figure.GraphicsTheme.TemporaryValue= 'light'; % TemporaryValue is just one MATLAB session
Please note that setting the DefaultFigureTheme will not continue to work in future releases.
Ryan Budde
Ryan Budde on 17 Dec 2023
Two key commands not yet documented:
First you can set the default figure theme for the session. This is critical if you are running a complex code package pre 2023a which makes a GUI / figure itself, while you yourself are in dark mode:
set(groot, "DefaultFigureTheme", "Light")
Second, a single figure's theme can be set by:
fh = figure(1)
fh.Theme = 'light'
fh.Theme = 'dark'
Rik
Rik on 15 Apr 2023
@Alfredo Bellido Rosas If you have R2023a, you don't have to wait, you can already install the new desktop.
Alfredo Bellido Rosas
Alfredo Bellido Rosas on 15 Apr 2023
I am relly waiting for this dark mode!
Matteo DESANTIS
Matteo DESANTIS on 24 Mar 2023
Excellent!
I realy dig the new graphics as well. I can't wat to see all of that in AppDesigner as well.
Thank you!
Marcial Sánchez Tecuatl
Marcial Sánchez Tecuatl on 19 Mar 2023
Thanks a lot for the detailed explanation.
All works flawlessly so far with the Dark Theme :)
Adam Danz
Adam Danz on 19 Mar 2023
Here are the steps I took to install the new desktop for MATLAB. You can also see this recent blog article explaining the process.
1. Open MATLAB R2023a
2. Download the FEX submission and run the newdesktopformatlab.mlpkginstall file. This prompt will appear:
3. If you press the accept button, this next prompt appears
4. To try the new desktop, press the "Close MATLAB...." button which will close MATLAB. You may or may not be prompted to confirm the exit depending on your preferences.
5. Open MATLAB R2023a again. This time you'll see a new spash screen appear while MATLAB is opening (No screen shot - I don't want to ruin the surprise)
6. After initializing, the Feedback and Stop New Desktop buttons appear toward the top, right.
Instructions also appear to guide users to the preferences panel to turn on dark mode. The preference panel will appear as follows. Select "Appearance" to see themes options to the right of the menu.
Michelle Hirsch
Michelle Hirsch on 18 Mar 2023
Hmmm, I’m not sure what happened. When the installation finished, you should have been promoted with a dialog asking if you wanted to enable the new desktop. Saying yes restarts MATLAB with the new desktop, and adds a button to the top of the window to switch back if necessary. The new desktop has a different preference panel which includes options for dark theme (which defaults to matching your system behavior).
Is there a button on the top of the desktop to turn on the new one? If not, you could try typing NewDesktop.start. But I’m recalling that from memory (not on my computer now) so that might be the wrong command.
I’ll check in with coworkers on Monday to see if they have other suggestions.
Marcial Sánchez Tecuatl
Marcial Sánchez Tecuatl on 18 Mar 2023
Thanks a lot for the follow up and update Michelle, I have installed successfully the New Desktop Add-On on R2023a but I have not find the option to switch from "regular" to "New" and dark desktop.
No new option is shown in Preferences.
Could you please clarify?
Your response is appreciated.
Image Analyst
Image Analyst on 3 Dec 2022
@Adrian Jose Wix Torres, sorry that you get headaches when looking at white screens. I just told MATLAB not to use system colors in my preferences and it looks like this now:
I haven't played around with it so I don't know if you can also turn the tabs and tool ribbon black. But even if not, maybe this will reduce your headaches.
Adrian Jose Wix Torres
Adrian Jose Wix Torres on 3 Dec 2022
Sorry but no. There is absolutely no excuse to be looking a white editor. In VScode, Atom. Intellij I can just download a Theme and have the editor looks nice without giving me a headache after 30 minutes of work. Now I have to take Ibuprofene to be able to finish a University assignment, so nice. There is no single fcking excuse for the IDE to be this bad.
Andrew Janke
Andrew Janke on 26 Oct 2022
> I do know that it is not easy to make a stable (supported) interface, however, what I intended to suggest was that instead of hard coding colors where we cannot override them, to refactor the color definition to an external file.
Yeah, but that begs the questions of "what are you going to put in that external file", and what are "the colors" and how are you going to override them? What's going to go in that external file?
Let's say there's a widget in the current Matlab Desktop GUI that is dark green, and you would like it to be light blue instead. How are you going to identify that widget in the external file, and communicate to Matlab that this widget and others like it should be blue? (Also, what is "blue"? Are we using flat RGB values here?) I'm thinking the external file would be a JSON or XML file that maps some names of classes of user interfaces elements to color definitions in some manner. But how are you going to define and then identify those classes of UI elements?
The folks working on HTML and CSS have spent the last twenty-five years working on this shizz, and they haven't quite figured it out yet. Give the MathWorks folks a little time here.
Nicolai Lamp
Nicolai Lamp on 25 Oct 2022
@Andrew Janke check out my new reply to the main thread, that would likely be the most unsupported and "beta testing" way to play around with what is coming up
Nicolai Lamp
Nicolai Lamp on 25 Oct 2022
@Andrew Janke I do know that it is not easy to make a stable (supported) interface, however, what I intended to suggest was that instead of hard coding colors where we cannot override them, to refactor the color definition to an external file.
I would not care if it would be completely unsupported or whatever necessary, but it would be nice to have that option, no matter how much/litte it could break the usefullness of the program if the end user messed up the file.
Andrew Janke
Andrew Janke on 24 Oct 2022
> "the product manager says that it is a big technology rewrite of the entire desktop environment" - this means, that the current desktop manager was written without considering such basic modifications.
Yep. The current Matlab desktop environment's architecture was written like 20 years ago, when themability/skinnability was a thing for WinAmp users, not for developers or text editor users, and "Dark Mode" was not even a thing.
> desktop = com.mathworks.mde.desk.MLDesktop.getInstance;
You are banging on undocumented Matlab internals here, and what you're getting is specific to the old-style Java Swing implementation of the Matlab Desktop environment. I'm pretty sure that stuff was never intended to be exposed to Matlab end users, and was certainly not designed for extensibility. Head on over to Yair's site if you want to work with this specific stuff.
My personal hope is that, in the future, Matlab exposes and supports some document, supported ways for users to interact with and customize the Matlab desktop environment. But this ain't that.
Andrew Janke
Andrew Janke on 24 Oct 2022
Thanks for coming by to address this, @Michelle Hirsch!
I have also been somewhat disappointed by the communication from MathWorks on this topic, since there's been so much "grassroots" demand for it, and it's a feature that everybody trendy cares about these days. (But not super surprised by it, since MW has never been great on communication for upcoming stuff in the first place. ;) ) It's nice to see actual grassroots/end-user demand for stuff in Matlab, and it would be nice to see MW responding directly to that, as opposed to manager/purchaser/decisionmaker demand.
I am not disappointed by the actual delivery schedule for this feature in Matlab. I suspect that many of the people being impatient about it have not themselves worked on a large multi-platform GUI app like Matlab, and may be grossly underestimating the amount of labor, cost, and complexity involved here.
I have tried the early-preview stuff in Matlab Online, and this looks interesting. I would like to be in on any previews or beta-testing of this stuff, or engineering discussions about how to design it. Y'all know where to find me.
One thing y'all should understand is that Michelle is not saying that they're rewriting the whole desktop GUI architecture here just in order to support Dark Mode. It's that MW has been re-doing the whole Matlab GUI architecture for other reasons, and for an app the size of Matlab, that's kinda like a decade-long effort. The interest and pressure for Dark Mode has been mostly coming in while that transition is already well under way. So it would be a waste to invest the effort in to making Dark Mode work in the old GUI way, when the old GUI way is basically going to be thrown away soon. Better focus all efforts on making it work well under the new GUI way. (Also, the old GUI way is Java Swing, and theming is a bit of a PITA there. Because that's 90's tech, from before people cared about theming so much.)
I think there's a couple things going on in this thread:
  1. Matlab supporting just Light Mode/Dark Mode variants, maybe respecting the OS's "current light/dark preference" state.
  2. Matlab supporting multiple or user-definable color schemes/themes/controls.
Item 2 is substantially more complex and difficult than item 1. For item 1, MW only has to come up with alternate dark-mode color and asset definitions for all the GUI items used for Matlab; that's only about the same amount of work as picking all the colors and rendering the assets for the original GUI. Plus a mechanism to do a simple A/B switch, and maybe linking that in to the global "dark/light" state that recent OSes expose. That can all be done with internal code.
(But Item 1 is still substantially more complex than just writing an app with one set of colors.)
If you want to do item 2 (supporting user-definable color themes) then you need to do things like defining a taxonomy of identifiers for all the colorizable elements in the entire Matlab GUI interface, choosing how colors are defined and how those are mapped to renderings in different OSes or presentation contexts, defining a file format for serializations of those definitions, deciding how they should be managed/imported/exported (like, on an installation/user/session/organization basis), and so on. This support of theming support is effectively part of the public, external interface to Matlab once it's introduced.
And then, MathWorks takes a long view on things, and has a strong commitment to back-compatibility. So MW kinda has to get this all right the first time, and then expect to support it for ten or twenty years.
So I think some of y'all, especially if you haven't personally worked on a large multiplatform GUI app like Matlab, and especially if you're coming from a web-dev background, maybe be substantially underestimating just how much work is involved in something like this.
I really like @Nicolai Lamp's idea of defining a JSON or XML format for saving color definitions in. That would support dark/light mode switching, and also support user-customizable themes. But I 100% disagree that that is the "simple" way of implementing it: defining a file format for those color definitions means adding a new public interface to Matlab, and implies defining a whole taxonomy of colorizable elements, with stable external identifiers, for every element of the entire Matlab application's GUI. That is a full engineer-year of work easy, and I'd bet that in practice it's several multiples of that.
(This is speaking as someone who's done rich-client GUI programming and syntax-highlighting definitions for various programming definitions. Defining just a decent syntax-highlighting theme is a fair amount of work, for a language that has a syntax definition, in an editor that supports theming. Defining that themeable syntax definition is more work, given an editor that supports theming. And what we're asking for here is more than all of that: we're asking Matlab to not just define a theme, or a themeable syntax definition, but to build themeability support into not just an editor, but an entire rich GUI app.)
I seriously hope that's where we end up! It would be great to have a themeable Matlab that provides default Light and Dark themes, and allows users to define or import their own themes. I can't wait to run Matlab in Beyonce Mode or Solarized Light. But I totally get it if they're not there yet.
(Sorry if I sound like a MathWorks apologist here! I just get grumpy when people want stuff that actually takes a lot of work to implement and don't appreciate the complexities involved.)
Michelle Hirsch
Michelle Hirsch on 13 Jun 2022
@Walter Roberson is right - we are running a limited beta of the new desktop with dark mode; it's not generally available in the prerelease. Email me if you'd like a link to sign up.
@Jan - There's really not a coupling beyond the long list of methods for controlling the desktop window and the challenge/cost of adding dark mode support. It might be that it's harder to add robust dark mode support in the current desktop than in the new desktop, but I'm not sure. It's really a question of how to best utilize limited development resources, as we focus our energy on getting the new desktop out as quickly as we can to release all of the new capabilities including dark mode.
Jan
Jan on 11 Jun 2022
"the product manager says that it is a big technology rewrite of the entire desktop environment" - this means, that the current desktop manager was written without considering such basic modifications. When I see this:
desktop = com.mathworks.mde.desk.MLDesktop.getInstance;
mainFrame = desktop.getMainFrame;
methods(mainFrame)
I'm starting to frighten. This looks like an overkill causes by an exploded complexity. This seems to be the explanation, why such a simple job like changing the color scheme becomes technological rewrite.
I've seen this trend to a massiv increase of complexity in multiple toolbox functions of Matlab. If implementing a color scheme requires substantial changes, it is time for an expensive refactoring of the window maneger.
Walter Roberson
Walter Roberson on 11 Jun 2022
So the product manager says that it is a big technology rewrite of the entire desktop environment, and that as work progresses there will be trials and plenty of consultations to be sure to get the rewrite correct.
And Mathworks Support says "It's not ready for preview yet and we don't know when it will be ready."
I do not see any contradiction. It is a big job, the phased trials have not taken place yet, it is not clear how long it is going to take. For example, when the first modified version becomes available for user testing, it could be the case that users say that the new version is too ugly, too slow, crashes a lot on some operating systems, or whatever: Mathworks is not going to provide a firm release date when there is the possibility that significant rework might be needed after user feedback.
Can Mathworks promise at this point that it will release the feature? I would not promise if I were them. It is a big project, which means expensive, and economics is notoriously difficult to forecast... and politics is very strange these days. A company might fully intend to make something available, but that does not mean that definitely it will be able to make it available.
The rewrite of the desktop is part of a long term strategy to get out of Java for all Mathworks-provided user interface and graphics. The App Designer tools is part of that strategy. uifigure and uiaxes are not java based. Companies are transitioning to more HTML 5 web-based interfaces. This is partly a reaction to Oracle requiring per-desktop paid Runtime licenses for Java (if I recall the fine print correctly, each virtual desktop is considered to require its own license.) Thus the rewrite is part of a key initiative that has been underway for years. But that does not mean that Mathworks can promise that the feature will definitely be available.
M Herper
M Herper on 11 Jun 2022
And why then this statement from Mathwork support as of 10. June 2022 in case numer 05571493 ?
..."I have been informed that, as of now, the option of a dark mode is not available in the Prerelease and there is currently no ETA on when and if a Dark Mode will become available."
What shall I believe now ?
z8080
z8080 on 14 Apr 2022
It is greatly appreciated that the LiveEditor now (2022a) finally has a dark mode. For me, this dissuaded me - at the very last minute - to after decades finally drop Matlab and migrate all my work to Python, which I was ready to do soon. Python's notebooks have natively supported dark mode for a long time. v2022a for me means postponing this step by a few more years at least, hopefully :-)
Still, elements of the old interface remain in Matlab, as Michelle says. Most annoyingly for me, they appear in the documentation window that opens upon pressing F1 for a given function. That one is so old school that I imagine nothing short of a complete makeover would make it support dark mode. Until then, I sadly rely on my browser to access all Matlab documentation.
Antonello Zito
Antonello Zito on 1 Apr 2022
Dear Michelle,
thank you very very much for your detailed and honest reply. We don't need to go into the details, as it has been already done. Just to remind that we all know how much difficult such a task would be for Mathworks, albeit being IMHO necessary. My perplexities (as well as for other users) were not just for the absence currently of a dark theme, but rather for the silence that there has been from Mathworks so far on this topic. But with your answer you confirm that this is on the to-do list, and we all appreciate this really a lot.
Thanks for your amazing work!
Nicolai Lamp
Nicolai Lamp on 1 Apr 2022
Thank you for your time addressing the silence!
IMO it would make sense to start out with the "simple" implementation of putting all color definitions into a color definition file in the matlab install directory or something similar, it could be .json .xml or perhaps even a .mat file for all I care.
Then move ALL color definitions and references you have throughout the application to that location so technical users / developers can make matlab scripts to modify that/those files and possibly have a simple way of switching between 2-3 different color files.
Then it would be possible to have traditional white as normally defined by Mathworks, Darkmode for daily development, and one or more color profiles for defining what you want to use as a middle ground in case you want accurate display of what is going to be printed/generated in reports and such.
The way Visual Studio Code is doing it works pretty well, overwrite settings in one .json, though I personally don't mind if we just do the custom edits directly in a file and then need to relaunch Matlab.
Some Matlab users are app developers themselves, so it doesn't matter if the functionality will be hacky at first, just introduce some form of interface to do something like this and I am certain that the community will happily help you make it easier to use pre-defined colorschemes for less tech savy users, just like the schemer script does with over 100k commmunity downloads.
All we ask for is some way to introduce this, in a deeper level than what your current color setting functionality allows.
After this is made possible, by all means, go and refactor community tools into Matlab for a nice integration
Walter Roberson