How to change the selection / hover color in explorer?
Windows Version: Win11 23H2
Question Hello, I want to edit my current theme. Exactly I do want to change the color of the selected item and the hover color over a item. Which property do I have to edit? Check my screenshot. I want this blue to some purple color. Thanks!
Things you already tried I installed the tool and imported my theme I want to edit.
Additional context
Checklist
- [x] My uxtheme.dll is patched
- [x] I am using the latest version of msstyleEditor
- [x] I checked the Wiki
- [x] None of the other issues cover this
TreeItem subclass is what you want to edit.
Msstyle Editor Picture
Thanks for your reply. Which color on the right panel do I have to change though?
Change the background by adding an IMAGEFILE, as you can see the background you see is an .png image. Create an image in figma for example and import it in your theme, make it as small as possible like 15x15 or something like that.
-Edit- But after importing an IMAGEFILE, then Contentmargins, Sizingmargins and SizingType come into play. SizingType:stretch takes that small png and stretches it.
Sizingmargin takes the amount of pixels we set not to stretch for example in a 15x15 image file, we can set the Sizingmargins (left,top,right,bottom) as 7; 8; 8; 7; bigger values than that break the image stretching due to the size of the image.
Contentmargins as far as i know change the image offset but doesn't work some times
So you mean I should change the image from HBOT and HOTSELECTED right? And this changes my background selection color in the explorer? Thanks!
So you mean I should change the image from HBOT and HOTSELECTED right? And this changes my background selection color in the explorer? Thanks!
Correct.
Sorry for the late response. How do I import my own .png file now?
The Import button is not available?
Thanks
@Undisputed00x Got it working. Thank you alot.
Do you know which property the mouse drag selection rect I have to edit to change the color?
Also is is possible to shrink down the close, minimize, ... buttons with msstyleEditor?
I think I applied a custom theme with UXThemePatcher?
Thanks
@Undisputed00x Got it working. Thank you alot. Do you know which property the mouse drag selection rect I have to edit to change the color?
Sysmetrics > Highlight + Hotlightor edit those through registry inHKEY_CURRENT_USER\Control Panel\Colors
Also is is possible to shrink down the close, minimize, ... buttons with msstyleEditor?
- Caption buttons are placed in
DWMWindowalso you can play with theme metrics inSysmetricswhich can be edited also in registryHKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics
Hello, I have done everything as described here. I have under “Explorer::TreeView/TREEITEM” and under “DarkMode_Explorer::TreeView/TREEITEM”, I inserted the graphics (IMAGES) and also edited the properties under HBOT and HOTSELECTED. However, absolutely nothing changes in my theme! Have I overlooked something? Is there anything else that needs to be changed?
Sorry for my bad english, is translated from DeepL.
@Undisputed00x Thanks got it working!
Now the last two question. Where do I change the file selection in the explorer?
Also in the context menu there is this selection, probably the same?
Where do I change these two? Thanks!
Edit: Is it also possible to change the color to a transparent one? I want some purple-ish but a bit transparent one. Maybe I do have to set a flag for this?
@Undisputed00x Thanks got it working!
Now the last two question. Where do I change the file selection in the explorer?
Also in the context menu there is this selection, probably the same?
Where do I change these two? Thanks!
DarkMode_Explorer::ListView > ListItemDarkMode_ImmersiveStart::Menu > 27
Edit: Is it also possible to change the color to a transparent one? I want some purple-ish but a bit transparent one. Maybe I do have to set a flag for this?
On images yes, just create your image and adjust the alpha value in the colors
Im gonna make a documentation of msstyles, probably in the wiki of this repo
@Undisputed00x Sorry, where is the 27?
I only have these:
We've gone far from the issue's topic, open a discussion ticket please.
So you mean I should change the image from HBOT and HOTSELECTED right? And this changes my background selection color in the explorer? Thanks!
@F1mmel Could you tell me if it worked. And how you did it.I want to change the highlight color to something that I can easily see.
Also how did u get the import button working?

