AccentColorizer icon indicating copy to clipboard operation
AccentColorizer copied to clipboard

Add support for accent color saturation level

Open WinExperiments opened this issue 1 year ago • 55 comments

This new version allows you to use any accent color, such as gray, brown, etc. Designed to colorize the default Windows 11 visual style and Rectify11's custom visual styles. Does not have the Windows version checks apart from the taskband ExtendedUI buttons.

WinExperiments avatar May 30 '24 19:05 WinExperiments

This does not mean it does not work on Windows Vista to 10, in fact, it should work as intended. My main concern was Windows 11.

WinExperiments avatar May 30 '24 19:05 WinExperiments

I just realized that we forked the project almost at the same time lol.

OrthodoxWindows avatar May 30 '24 19:05 OrthodoxWindows

@OrthodoxWindows Try out my new version, you'll like it.

WinExperiments avatar May 30 '24 20:05 WinExperiments

@OrthodoxWindows Try out my new version, you'll like it.

Indeed, your changes fix all the problems I was having. Thank you very much.

However, I still see one element not colorized ; these are some frames related to the Basic theme (if you use the Basic theme with DWM, you have to use this Windhawk mod to enable them) in the Aerolite style : msdt_tLbr88Vnx2

For some reason, in the Aero style, it seems to be colorized correctly : msdt_qt62jZWYpl

OrthodoxWindows avatar Jun 01 '24 21:06 OrthodoxWindows

@krlvm This one has full HSL support, meaning the bitmaps change according to the different brightness levels of accent colors. It fully works on the Rectify11 visual styles (light and dark), but on the Microsoft ones (Windows 10/11), the Explorer list views do not support all colors and may turn into weird colors. I thought it was the transparent pixels but they colorize perfectly with the Rectify11 styles. I tried multiplying the saturation by 0.9 and that workaround works but the colors are more inaccurate.

WinExperiments avatar Jun 03 '24 11:06 WinExperiments

This is still very cool, I'll think about how I can help this evening and we'll merge it into the upstream

krlvm avatar Jun 03 '24 11:06 krlvm

Have you checked the code?

WinExperiments avatar Jun 03 '24 19:06 WinExperiments

Currently it breaks with light orange color: image

krlvm avatar Jun 04 '24 09:06 krlvm

(just for record, will check what we can do with it)

krlvm avatar Jun 04 '24 09:06 krlvm

Interestingly enough, the correct colors show up if you have the items grouped and click the expand/collapse button. They only show up when the animation is playing, when it finishes, the broken color comes back.

WinExperiments avatar Jun 04 '24 11:06 WinExperiments

Interestingly enough, the correct colors show up if you have the items grouped and click the expand/collapse button. They only show up when the animation is playing, when it finishes, the broken color comes back.

The (almost) correct color is also applied to the ListView items focused state

krlvm avatar Jun 04 '24 11:06 krlvm

Does this fix the color issue?

WinExperiments avatar Jun 04 '24 12:06 WinExperiments

Yes, it works much better. Thank you!

However, if you set accent color back to Standard Blue, everything looks undersaturated in comparasion to the default colors - where did you get g_hslDefaultAccent values from?

krlvm avatar Jun 09 '24 14:06 krlvm

This is almost perfect, its only bug is when the theme is changed, it applies a weird light gray color and changing the accent color to a normal one gives wrong lightness values and gradients are completely ruined.

WinExperiments avatar Jun 11 '24 18:06 WinExperiments

Oh and I also forgot to restore the menu/progress bar checks since this is aimed at Rectify11.

WinExperiments avatar Jun 11 '24 18:06 WinExperiments

@krlvm I think we should make the program restart itself when WM_THEMECHANGED is sent but I don't know how to do that.

WinExperiments avatar Jun 12 '24 10:06 WinExperiments

Oh and I also forgot to restore the menu/progress bar checks since this is aimed at Rectify11.

Do you plan to fix the issue with some Basic window frames in the Aerolite style ? (as I described above)

OrthodoxWindows avatar Jun 12 '24 10:06 OrthodoxWindows

@OrthodoxWindows Aerolite uses a fillcolor for that frame which AccentColorizer cannot colorize. It can only colorize bitmaps.

WinExperiments avatar Jun 12 '24 16:06 WinExperiments

@krlvm Have you figured out why theme changing is broken?

WinExperiments avatar Jun 13 '24 16:06 WinExperiments

I will check soon, thank you

krlvm avatar Jun 13 '24 16:06 krlvm

Update: I got hue and saturation, but lightness is still not accurate. Gradients are smooth which means the lightness proportions are correct.

WinExperiments avatar Jun 16 '24 13:06 WinExperiments

Update 2: It's now fixed! (though it seems to work when I build it as debug only)

WinExperiments avatar Jun 16 '24 14:06 WinExperiments

~It also works when I build it as Release Static... why is Release broken?~ Doesn't work after a few theme changes as well.

WinExperiments avatar Jun 16 '24 15:06 WinExperiments

@krlvm Any update? If you can make it work on Release just like how it does on Debug, then we can ship it

WinExperiments avatar Jun 18 '24 08:06 WinExperiments

I'll check it now, thanks

krlvm avatar Jun 18 '24 11:06 krlvm

Did you mean launching Release builds or running it? There was a mistake in the build configuration, which prevented Release builds from being launched from VS.

As for the results, I don't see any difference from Debug.

It's as if there is no idempotency now - after each restart of the program the colors become darker and darker.

krlvm avatar Jun 18 '24 12:06 krlvm

It's as if there is no idempotency now - after each restart of the program the colors become darker and darker. What do you do to get the colors darker?

WinExperiments avatar Jun 18 '24 12:06 WinExperiments

I just kill and start the process again, so it recolorizes everything one more time

krlvm avatar Jun 18 '24 12:06 krlvm

You can also change accent colors back and forth a few times and then check the produced color with a graphics editor - it will change

krlvm avatar Jun 18 '24 13:06 krlvm

I just kill and start the process again, so it recolorizes everything one more time

Yes, I have not addressed this issue. I always assumed users would start it once until they restart the device (which resets bitmaps back to default colors). I guess we can save the g_oldhslAccentS and g_oldhslAccentL values get saved in a way that is preserved even if AccentColorizer is not running?

WinExperiments avatar Jun 18 '24 13:06 WinExperiments