Changing interface color for nightshift
Is it possible to use white background during the day, and dark grey at night when the sun is down?
I've set up my Mac to do just that, but unlike Mac apps, Photoshop refuse to go along.
Thanks,
-Ronald
Is it possible to use white background during the day, and dark grey at night when the sun is down?
I've set up my Mac to do just that, but unlike Mac apps, Photoshop refuse to go along.
Thanks,
-Ronald
One can of course manually change this in Preferences > Interface...
An action or a script can help to automate this. The following conditional script will change the UI to the dark theme between 6pm and 6am (based on your computer clock), otherwise, it will use the original/white theme:
/*
Night Shift Interface Colour Theme Change.jsx
v1.0 - 17th April 2023, Stephen Marsh
https://community.adobe.com/t5/photoshop-ecosystem-discussions/changing-interface-color-for-nightshift/td-p/13729086
*/
#target photoshop
var theTime = new Date().toLocaleTimeString().replace(/(\d{2})(.+)/, "$1");
theTime = Number(theTime);
// Dark between 6pm and 6am
if (theTime >= 18 || theTime < 6) {
setUIcol("kPanelBrightnessDarkGray");
} else {
setUIcol("kPanelBrightnessOriginal");
}
function setUIcol(uiCol) {
// "kPanelBrightnessOriginal" | "kPanelBrightnessLightGray" | "kPanelBrightnessMediumGray" | "kPanelBrightnessDarkGray"
function s2t(s) {
return app.stringIDToTypeID(s);
}
var descriptor = new ActionDescriptor();
var descriptor2 = new ActionDescriptor();
var reference = new ActionReference();
reference.putProperty( s2t( "property" ), s2t( "interfacePrefs" ));
reference.putEnumerated( s2t( "application" ), s2t( "ordinal" ), s2t( "targetEnum" ));
descriptor.putReference( s2t( "null" ), reference );
descriptor2.putEnumerated( s2t( "kuiBrightnessLevel" ), s2t( "uiBrightnessLevelEnumType" ), s2t( uiCol ));
descriptor.putObject( s2t( "to" ), s2t( "interfacePrefs" ), descriptor2 );
executeAction( s2t( "set" ), descriptor, DialogModes.NO );
}
Instead of manually running the script, it can be set to run automatically via the Script Events Manager:
https://prepression.blogspot.com/2021/10/photoshop-script-events-manager.html
It would just be a case of setting one or more events to trigger the script.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.