3

The Display Screen Optimiser

I have a web app which identifies the optimal background colours for reading speed. It can set this optimal colour as the background for our site but our users want to be able to implement this in their apps as well.

I found the function

SetSysColors(r,g,b);

<DllImport("User32")> _ Private Shared Function SetSysColors(ByVal nChanges As Integer, ByRef lpSysColor As Integer, ByRef lpColorValues As Integer) As Integer End Function

https://www.autoitscript.com/autoit3/docs/libfunctions/_WinAPI_SetSysColors.htm

but it seems to only be useable from an app installed on the user's system either using VB dotNet or C++. (For example an app with dropdowns for R G and B which provide the colour arguments and trigger the function.)

The dot themes (beige.theme) file from this post does what I need it to do in terms of setting the background colours but it messes up the task bar.

How to change default window background color in Windows 10?

Network Script

In an ideal world I would also like to be able to run a command from a network login script to apply the colours at login. It would be related, I believe, to this answer though it does not seem to be a solution for this problem as it is only for changing the desktop background, which I do not need to do.

How do I set the desktop background on Windows from a script?

I realise it is regarded as bad form to mess with users' settings and bordeline hacking to do it from a webpage but that is the solution I have been tasked with on https://screenrisk.com

This answer came close in as much as the first answer complains that the solution offered changed his background colours

https://stackoverflow.com/questions/1148378/replace-system-color-in-windows-backgrounds/1148396

I have not, however, found any method to trigger this funtionality from a button on a webpage using JavaScript, for example, which is what I need to achieve for the first part of this problem (the network setting of the optimal colour being the second part).

The web app does set a cookie for the optimal colour but I am also assuming that there is no way for another service to get access to the settings saved in the cookie.

It can also be got from the app itself when it completes its task of identifying the optimal colour. It uses a PHP wrapper to an aspx app to enable its results to be integrated into WordPress.

I would very much appreciate any thoughts on how these two issues could be resolved as, so far, I have come to the conclusion that they can't.

Steve
  • 131

0 Answers0