Hi guys,
I've got a module script inside a GUI which is supposed to returning a Color3 value from the background colour of the GUI:
local _M = {} function _M.colour(p_colour) local ref = script.Parent p_colour = Color3.fromRGB(ref.BackgroundColor3.r, ref.BackgroundColor3.g, ref.BackgroundColor3.b) print(p_colour) return(p_colour) end return _M
the background of the GUI is: 50, 142, 184
but It always returns: 00768935, 0.00218378, 0.00282968
...which is clearly wrong.
I've also tried:
local _M = {} function _M.colour(p_colour) local ref = script.Parent p_colour = Color3.fromRGB(ref.BackgroundColour3) print(p_colour) return(p_colour) end return _M
But this returns 0,0,0 black again...
Why is this happening and how can I fix it?
Thank you for your time! :) Sorry if this is a dumb question haha
local _M = {} function _M.colour(p_colour) local ref = script.Parent p_colour = ref.BackgroundColour3 -- Removed Color3.fromRGB print(p_colour) return(p_colour) end return _M