Module:RandomColor

local c = string.char

local function char(dec) return dec >= 10 and c(54 + dec) or tostring(dec) end

return { main = function math.randomseed(os.time) local rgb = { math.random(255), math.random(255), math.random(255) } local hex = "#" for i=1,3 do           local d = rgb[i] / 16 hex = hex .. char(math.floor(d)) .. char((d % 1) * 16) end return hex end }