Change Desktop Color

Is there a way to change the desktop color with a macro?

Keyboard Maestro cannot set the desktop color, but it can set the desktop image.

And it can set an image that fits to the screen and thus has a background color to fill the rest of the screen.

And you can easily create an image that is entirely transparent.




This is great.

And is there a way to set that background color programmatically — say, so that a macro could run once per minute, slowly rotating through the hues in a color wheel?

Only by creating the action via XML and executing it that way.

Somehow I’d missed that this was a thing one could do. :open_mouth: Wow!

Right. I’ll look down this XML rabbithole soon....

There appears to be a regression in macOS Sonoma that causes the fillColor option to be ignored. I've done a bit of research into this bug in a Swift app I'm working on, and noticed that this regression impacts Keyboard Maestro's "Set Desktop Image" action as well, presumably because KM is using the same setDesktopImageURL API method that I'm using. I'm curious if anyone else has encountered this issue, and if there's any workaround. My research and a link to a sample project is here