Recently I have been working on a plugin that gives you access to the Roblox Studio settings in an easier and intuitive way, I am very disappointed that I was unable to change the Roblox Studio theme using a plugin/command bar;
I may have misinterpreted it, or something is not right. I know about the existence of a StudioTheme class, but I still haven’t figured out how to modify or access it. I would therefore like to know if this is possible and how I can execute it, since this knowledge does not seem to be documented in the Developer Hub.
No, not possible. You can modify colours but not the theme. Hypothetically you could change the theme but Theme expects a StudioTheme object which can’t be instanced.
StudioTheme is a read-only class that’s intended for you to know what theme is currently in use so you can reconfigure your plugin UIs and such. It also comes with an event, ThemeChanged, so you can change your own widget themes on the fly. It’s not intended for writing to. You’ll also notice this is why StudioTheme’s API only consists of getters and no setters.
Not sure why documentation includes set because you can’t.
Theme here references the colour schema for your Script Editor window to create a “theme”. These can be changed because the properties expect a Color3 object when attempting to set. Not Theme (as in Light/Dark): that expects a StudioTheme object which you can’t create.
Oh, is that so? If it actually can, then my bad, because I haven’t actually tested the plugin. I tried running a quick script from the command bar but it resulted in an error.
settings().Studio[“UI Theme”] = “Light”
01:54:32.019 - can’t set value
Could have to do with the security context level of plugins. Have you used this plugin before and can confirm that it’s able to switch Studio between light and dark mode? Seems that doesn’t coincide with OP’s testing but again, difference in security levels probably plays into that.