Search code examples
windows-10visual-studio-2022solution-explorer

How to Change Active Item Highlight Color in Visual Studio 2022


How do I change the Highlighted Active Item in the Solution Explorer window in Visual Studio 2022? Operating system is Windows 10


Solution

  • Out of the box, Visual Studio does not appear to have an option to change this. However, you can change this if you install an extension called Visual Studio Color Theme Designer. I've gone over how to use this extension in this answer but in short, you will need to create a VSTheme project, select a base theme, and then change the properties of the controls you want to change.

    Once you set it up, find the following controls:

    Under All Elements → Tree View:

    • SelectedItemActive (the first one which is for the background)
    • SelectedItemActive (the second one, which is for the foreground/text)

    After you find these two, change the color of them to whatever you desire, and apply the theme. You may also want to change SelectedItemInactive (again, there are two where one is for the background, and the other is for the foreground).

    You can see here that I've changed mine to a bright green with blue text:

    solution explorer showing highlighted item with a green background and blue foreground

    Note that this will also change similar windows that use a "tree view" since it is a shared property between the various windows (for example, Server Explorer will also inherit these settings).