---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- DateTime: 7/21/2025 18:47
---

-- Color3

Color3 = {}

function Color3.new(r, g, b, a)
    local table = {}
    if type(r) == "string" then
        if r:sub(1, 1) == "#" then
            r = r:sub(2)
        end
        if r:len() == 8 then
            table.A = tonumber(r:sub(7), 16)
            table.B = tonumber(r:sub(5, 6), 16)
        else
            table.A = 1
            table.B = tonumber(r:sub(5), 16)
        end
        table.G = tonumber(r:sub(3, 4), 16)
        table.R = tonumber(r:sub(1, 2), 16)
    else
        if a ~= nil then
            table.A = a
        else
            table.A = 1
        end
        table.B = b
        table.G = g
        table.R = r
    end

    setmetatable(table, {
        __add = function(l, r)
            return Color3.new(l.R + r.R, l.G + r.G, l.B + r.B, l.A + r.A)
        end,
        __sub = function(l, r)
            return Color3.new(l.R - r.R, l.G - r.G, l.B - r.B, l.A - r.A)
        end,
        __mul = function(l, r)
            -- Dont worry: one of the arguments is a color3
            if type(l) == "number" then
                l = Color3.new(r, r, r, r)
            end
            if type(r) == "number" then
                r = Color3.new(r, r, r, r)
            end
            return Color3.new(l.R * r.R, l.G * r.G, l.B * r.B, l.A * r.A)
        end,
        __div = function(l, r)
            if type(r) == "number" then
                r = Color3.new(r, r, r, r)
            end
            return Color3.new(l.R / r.R, l.G / r.G, l.B / r.B, l.A / r.A)
        end,
        __tostring = function(color)
            return color.R..", "..color.G..", "..color.B..", "..color.A
        end
    })

    return table
end

function Color3.fromRGBA(r, g, b, a)
    return Color3.new(r / 255, g / 255, b / 255, a  / 255)
end

function Color3.fromRGB(r, g, b)
    return Color3.new(r / 255, g / 255, b / 255)
end

Color3.Red = Color3.new(1, 0, 0)
Color3.Green = Color3.new(0, 1, 0)
Color3.Blue = Color3.new(0, 0, 1)
Color3.White = Color3.new(1, 1, 1)
Color3.Black = Color3.new(0, 0, 0)