Script editor plugin turning everything black

Hello there guys,
I am currently scripting a plugin that will have several functions one of these being script editor themes.

My current problem is I have a chunk of code that will make the script editor default light, however when the plugin runs the whole script editor turns black, like this:


Also notice the numbers in the settings window for the colours the numbers are way off.

Here is my script after I have to reset settings and restart studio. :sweat:

settings().Studio[“Text Color”] = Color3.new(0,0,0)
settings().Studio[“Background Color”] = Color3.new(255,255,255)
settings().Studio[“Selection Color”] = Color3.new(255,255,255)
settings().Studio[“Selection Background Color”] = Color3.new(110,161,241)
settings().Studio[“Operator Color”] = Color3.new(127,127,0)
settings().Studio[“Number Color”] = Color3.new(0,127,127)
settings().Studio[“String Color”] = Color3.new(127,0,127)
settings().Studio[“Comment Color”] = Color3.new(0,127,9)
settings().Studio[“Preprocessor Color”] = Color3.new(127,0,0)
settings().Studio[“Keyword Color”] = Color3.new(0,0,127)
settings().Studio[“Error Color”] = Color3.new(255,0,0)
settings().Studio[“Warning Color”] = Color3.new(0,0,255)
settings().Studio[“Find Selection Background Color”] = Color3.new(255,26,167)
settings().Studio[“Matching Word Background Color”] = Color3.new(226,130,214)
settings().Studio[“Built-in Function Color”] = Color3.new(0,0,127)
settings().Studio[“Whitespace Color”] = Color3.new(184,184,184)

Thank you in advance for any help. ICrann

Color3 is not a 0 - 255 scale, it’s a 0 - 1 scale. You can either divide all of the numbers by 255 as fractions (excluding 0 and 255, which would result in 1) or use Color3.fromRGB.

So

settings().Studio[“String Color”] = Color3.new(127,0,127)

would become

settings().Studio[“String Color”] = Color3.new(127 /255, 0, 127 / 255)
1 Like

I just replaced .new with Color3.fromRGB. Thank you very much. ICrann