Change one color of any window (Removing all white for eyestrain)

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
func
Posts: 47
Joined: 20 May 2016, 20:52

Change one color of any window (Removing all white for eyestrain)

18 Apr 2022, 11:25

Goal: Change the default, eye-shattering white background color of most old apps or windows controls (most listviews, tree views, etc) to be light grey instead of white, to prevent eye strain.

Currently using WinSet, Transcolor, FFFFFF, A you can change a color of any active window, it becomes transparent but also click-throughable, this is important because if you change the white color, then most windows cannot be draggable or resizable anymore, I assume because that region is registering as 'white' even if it's not visible as white because of the OS theme.

My idea is to then create a new window, with no visible title bar, and set its background to light grey, and its size to the exact size of the window you just set a transcolor on. Then, position it exactly over and behind the window you just set a transcolor on. It's important the AHK script knows this is a "child window" to the window you just set the transcolor on. When you clickthrough the transcolor and select the child window below - it should allow you to drag the child window to resposition it, or resize it, if the parent window is draggable or resizable. When you are repositioning or resizing the child window, the AHK script should continuously set the parent windows size and position to match the child window - thus keeping the child window and parent window perfectly lined up.

If the child window is always right behind the parent window, then this is a viable method to accomplish this effect - I could even see it being worth a lot for preventing eyestrain on many older apps that don't have dark themes (There are MANY popular apps like this, for example, Revit, and Adobe XD, ironically a UI design app that won't let you get rid of the eye straining white).
The problem is I don't know how to make the AHK windows which need to go behind parent windows 'stay behind' those other windows, is this possible? What if the parent window is a popup window in another program, such as a file open dialog, will it work then?

Just hoping someone with more experience in AHK can help me understand if this will all work in theory before I invest days of time trying to make it work.
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Change one color of any window (Removing all white for eyestrain)

18 Apr 2022, 13:46

I often wonder (BTBH, don't really care) why (nowadays) people prefer dark themes over the traditional book'ish "black on white"? :shifty:
https://ux.stackexchange.com/questions/53264/dark-or-white-color-theme-is-better-for-the-eyes#53268
Anyway. Good luck :)
func
Posts: 47
Joined: 20 May 2016, 20:52

Re: Change one color of any window (Removing all white for eyestrain)

18 Apr 2022, 18:03

Replacing white with light gray still gives all the benefits of dark characters on lighter background, it just reduces the eyestrain from glaring white screens. It's not a 'dark theme', it's just a 'sane light theme'.
ananthuthilakan
Posts: 188
Joined: 08 Jul 2019, 05:37
Contact:

Re: Change one color of any window (Removing all white for eyestrain)

19 Apr 2022, 14:40

func wrote:
18 Apr 2022, 18:03
Replacing white with light gray still gives all the benefits of dark characters on lighter background, it just reduces the eyestrain from glaring white screens. It's not a 'dark theme', it's just a 'sane light theme'.
i read the above mentioned studies, and it also mentions dark theme is preferred for long term usage i guess
metrorail
Posts: 1
Joined: 02 Jun 2022, 08:30

Re: Change one color of any window (Removing all white for eyestrain)

02 Jun 2022, 08:39

Personally I just applied dark theme everywhere I can do it. In windows changed to dark blue-green (something like that https://create.vista.com/colors/color-names/electric-blue/ but dark one) color and all. Dark wallpapers and night sight. Result is liked, there are nothing to improove

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: kaka2, SmithyZoomZoom and 143 guests