Visual Studio 2017 High Contrast Theme Dark Registry Hack

May 31, 2017 | By | Add a Comment

I run a high contrast Windows theme because I have crappy eyesight. I also program for a living and use Microsoft Visual Studio. Visual Studio has a rather lovely “Dark” theme that suits my tired old eyes very well. Unfortunately, Microsoft won’t let me use their nice “Dark” theme, because someone at Microsoft thinks they know what I want, better than I know myself. Instead, Microsoft forces Visual Studio to use their special “High Contrast” theme. The theme dropdown in the options is disabled and font/color styling is limited to a handful of colors.

So what’s the problem with that, you ask? I mean,I’m happy to use the high contrast theme elsewhere in Windows, so what’s the big deal?  For starters, their “High Contrast” theme is terrible. There is no syntax coloring or styling. It is plain, white text on a black background. It is a goddamn travesty. But the thing that bugs me most is, someone made a decision to take this choice away from me, making my work harder, and forcing me to endure a sub-optimal experience, reserved only for visually impaired users. Bravo Microsoft. Your good intentions kinda suck.

It’s not just me. Lots of people have the same problem, and not just VI users either. Here’s Microsoft’s official stance on this long existing problem..

https://developercommunity.visualstudio.com/content/problem/15287/visual-studio-forces-the-user-to-use-its-high-cont.html

Thank you for your feedback! The Visual Studio team has determined that this issue will not be addressed in the upcoming release. We understand the desire to have VS use a different theme from the system. To support customers who rely on high contrast and give them a single experience, we believe the the accessibility for visual Studio is paramount in this instance. We will continue to evaluate it for future releases. Thank you for helping us build a better Visual Studio!

So basically they’re say “tough shit”.

So what is a programmer to do? Well there is a registry hack that I’ve used for a few generations of Visual Studio (like I said this is not a new issue). The hack essentially overwrites the crap “High Contrast” theme with the lovely “Dark” theme in the registry.

https://stackoverflow.com/questions/14305176/how-do-i-use-visual-studio-2012-dark-theme-with-windows-8-high-contrast-theme

  1. Export this registry key: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config\Themes{1ded0138-47ce-435e-84ef-9ec1f439b749} (this should the key of the Dark theme)
  2. In the exported file replace the GUID of the Dark Theme ({1ded0138-47ce-435e-84ef-9ec1f439b749}) with the GUID of the High Contrast theme ({a5c004b4-2d4b-494e-bf01-45fc492522c7}):
  3. Import the reg file

This worked like a charm up until Visual Studio 2017, but they have moved the config settings out of the registry and into %AppData%. The config is stored in a private registry that can be loaded and edited in RegEdit. The themes are stored in the private registry and can be edited the same way as the old, working hack.

https://stackoverflow.com/questions/41119996/where-does-visual-studio-2017-rc-store-its-config

Fortunately, you can use regedit.exe to load a private hive. You need to select the HKEY_USERS node, and click the File > Load Hive… menu. You select the privateregistry.bin file [Editors note: located in; C:\Users\<username>\AppData\Local\Microsoft\VisualStudio\15.0_????????\] , give a name to the hive (I entered “VS2017PrivateRegistry”) and now you can see the 15.0_Config key populated as usual.

Once you have the Hive loaded into RegEdit, you can navigate to the key here;

HKEY_USERS\VS2017PrivateRegistry\Software\Microsoft\VisualStudio\15.0_????????_Config\Themes\

Now the hack would be..

  1. Export te “Dark” theme registry key: HKEY_USERS\VS2017PrivateRegistry\Software\Microsoft\VisualStudio\15.0_????????_Config\Themes\{1ded0138-47ce-435e-84ef-9ec1f439b749}
  2. Replace the GUID of the “Dark” theme ({1ded0138-47ce-435e-84ef-9ec1f439b749}) with the GUID of the “High Contrast” theme ({a5c004b4-2d4b-494e-bf01-45fc492522c7})
  3. Import the reg file

Note:  Be sure to UNLOAD the Hive once you’ve applied the registry hack. Otherwise, Visual Studio wont run.

Meanwhile, Microsoft continues to see this as a non-issue.

Category: Programming

About the Author ()

Leave a Reply