How can I change script editor theme using script?

I change my studio script editor theme once in a while, I save the color codes somewhere since there are only 3 slots for the scripting editor color preset, and one Issue I’ve encountered is that whenever I want to change my script editor theme, I have to set the color codes manually, one by one, which frustrates me.

So I was wondering if I can possibly change my script editor theme using script? as this would help me save time a lot! and it would also make sharing it easier too.

I’ve looked into many APIs, and threads but found no solution

Also, I’ve seen many script editor theme plugins able to change the script editor theme, but I’m not too sure how they make it work and what type of API they use to achieve it.

If you have any information about this, I’d appreciate your help!

You can change settings which you would get by doing Alt+S. Do this:

settings().Studio[ColorSettingHere] = Color3.new(•••, •••, •••)

You can see all the settings here if you want: Studio | Roblox Creator Documentation

This is how you change background color to red:

settings().Studio["Background Color"] = Color3.new(1)
1 Like

Alright, let me try it real quick

It actually worked, I cant believe It was that easy and I couldn’t figure it out

Thank you very much for your help!

Also it doesn’t seem like I can set local Color as it has “” in the name, what can I do?

You can use ' or add \ before the " to make code avoid syntax.

In this case, it can be '"local" Color'.

Yea I actually figured it out myself, but thank you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.