Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Color3.new(67,67,67) changes color to white instead of grey?

So everything in this script is correctly set up. I press the button, the GIU changes color. However, 67,67,67 is a GREY color, but clicking this GUI only results in a WHITE color. any help? (I also get the print in output) PLUS I also tried using the variable.

local INFO = script.Parent.Parent.Parent.Parent.Info2
local THEME = script.Parent.Parent.Parent
local MENU = script.Parent.Parent.Parent.Parent.Info
local IMAGE = script.Parent.Parent.Parent.Parent.Images
local MOVIES = script.Parent.Parent.Parent.Parent.ScrollingFrame
local UPDATE = script.Parent.Parent.Parent.Parent.Updates.TextLabel
local PRIMARY = Color3.new(255,255,255)
local SECOND = Color3.new(67, 67, 67)
--Script


script.Parent.MouseButton1Click:connect(function()
UPDATE.BackgroundColor3 = Color3.new(67,67,67) --changes dark red to grey
print("Dark Theme Enabled")

end)



3 comments

0

You already have a variable set for 'Color3.new(67,67,67) which appears to be 'SECOND'. Try using the variable instead.

0

already did

0

Color3.fromRGB(), not Color3.new()

2 answers

✓ Accepted answer

Color3.new

This value ranges from 0 to 1. The number 0 means complete black, the number 1 means complete light. Simply 1 = 255, 0 = 0.

If you want to use this method with your 255 color range, then you must divide to get the color you want.

Color3.new( 67/255, 67/255, 67/255 )

Color3.fromRGB

This constructor has value ranges from 0 to 255, the one we all are used to, making decimals unnecessary.

Color3.fromRGB( 67, 67, 67 )

Good luck!

I don't know why they did it this way, but from scripting you have to use decimals, so put "/255" after each of the numbers to create a decimal, for the "255", you can just put 1, since 255/255 = 1. I hope this helps you to understand how they're used.

This discussion is preserved as it was. New answers, comments, and votes are closed.