Reputation: 168
Is there anyone who is using Visual studio 2019 in dark mode with High contrast? If yes, can you tell me exactly how to do that?
As far as I know, Visual studio doesn't have an option to use High contrast for dark mode (it's there only for blue theme which I don't want).
And also if I change my Windows OS to use high contrast mode and come back to Visual studio, and then by default VS adjusts itself to high contrast but it's very poor to read (it reads like plain white text on a black blackground devoid of any other colors)
I was wondering if there's something in VS 2019 which is similar to Visual studio code high contrast mode or maybe IntelliJ Idea which is very user friendly and serves the purpose.
Thanks in advance.
Upvotes: 1
Views: 3007
Reputation: 100
The most clean way is to modify the current used theme as this is the behaviour Visual Studio executes when changing themes in the settings.
Ctlr+R
and run regedit
HKEY_USERS
File
-> Load Hive...
C:\Users\<UserName>\AppData\Local\Microsoft\VisualStudio\16.0_XXXXXXXX
or if you use Visual Studio 2022 C:\Users\<UserName>\AppData\Local\Microsoft\VisualStudio\17.0_XXXXXXXX
and load the privateregistry.bin
file. It will ask you to give some name, for example, "vs2019". (before proceeding a backup of the privateregistry.bin file is advised)HKEY_USERS\vs20xx\Software\Microsoft\VisualStudio\1x.0_xxxxxxxx\ApplicationPrivateSettings\Microsoft\VisualStudio
ColorTheme
and ColorThemeNew
to 0*System.String*1ded0138-47ce-435e-84ef-9ec1f439b749
and 0*System.String*{1ded0138-47ce-435e-84ef-9ec1f439b749}
respectively. If you wish any other color please check HKEY_USERS\vs20xx\Software\Microsoft\VisualStudio\1x.0_????????_Config\Themes\
for the theme IDs.vs20xx
and then File
-> Unload Hive...
This will change the setting in Visual Studio to use a different theme instead of changing the themes themselves and will most likely be persistent after updates.
Upvotes: 0
Reputation: 1
Visual Studio likes resetting this pretty often so I made a cmd script that lets you select what theme to override 'High Contrast' with instead of doing all of those steps manually each time.
Get the script here.
Upvotes: 0
Reputation: 33
You can enable dark mode in the VS2019 by modifying a private registry in a next way:
Close all instances of VS2019
Press Ctrl+R
and run regedit
Expand HKEY_USERS
elements in the tree
File
-> Load Hive...
In the dialog navigate to C:\Users\<UserName>\AppData\Local\Microsoft\VisualStudio\16.0_XXXXXXXX
and load privateregistry.bin
file. It will ask you to give some name, for example, "vs2019". (it might be useful to store somewhere a copy of privateregistry.bin
file for backup)
Export te “Dark” theme registry key: HKEY_USERS\vs2019\Software\Microsoft\VisualStudio\16.0_????????_Config\Themes\{1ded0138-47ce-435e-84ef-9ec1f439b749}
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}
)
Import the reg file
Important: Click on vs2019
-> File
-> Unload Hive...
Note, it might happen after Windows or VS updates, your setting will be erased. In this case, you need only to load hive, import modified file from step 7
, and don't forget to unload hive.
Inspired by this post: Visual studio 2017 high contrast theme dark registry hack
Upvotes: 2