mirror of
https://github.com/ctruLua/uCompat.git
synced 2025-10-28 00:59:31 +00:00
Initial untested code.
This commit is contained in:
parent
f18dc53472
commit
7844e5a117
3 changed files with 215 additions and 0 deletions
16
Color.lua
Normal file
16
Color.lua
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
--[[
|
||||
Colors related µLua compatibility layer/lib for ctrµLua
|
||||
]]
|
||||
|
||||
Color = {}
|
||||
|
||||
function Color.new(r, g, b)
|
||||
r = r*8
|
||||
g = g*8
|
||||
b = b*8
|
||||
return (r+g*256+b*65536)
|
||||
end
|
||||
|
||||
function Color.new256(r, g, b)
|
||||
return (r+g*256+b*65536)
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue