mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-26 01:03:46 +01:00
colorspec: expose metatable
This commit is contained in:
parent
f06bda9785
commit
2d47f5fd9f
@ -159,7 +159,8 @@ named_colors = {
|
||||
|
||||
colorspec = {}
|
||||
|
||||
local colorspec_metatable = {__index = colorspec}
|
||||
local metatable = {__index = colorspec}
|
||||
colorspec.metatable = metatable
|
||||
|
||||
function colorspec.new(table)
|
||||
return setmetatable({
|
||||
@ -167,7 +168,7 @@ function colorspec.new(table)
|
||||
g = assert(table.g),
|
||||
b = assert(table.b),
|
||||
a = table.a or 255
|
||||
}, colorspec_metatable)
|
||||
}, metatable)
|
||||
end
|
||||
|
||||
colorspec.from_table = colorspec.new
|
||||
|
Loading…
Reference in New Issue
Block a user