mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-22 07:13:45 +01:00
Add minetest.colorspec:to_number_rgb
This commit is contained in:
parent
d1baf23814
commit
e212ba7f3b
@ -245,6 +245,10 @@ function colorspec:to_number()
|
||||
return self.r * 0x1000000 + self.g * 0x10000 + self.b * 0x100 + self.a
|
||||
end
|
||||
|
||||
function colorspec:to_number_rgb()
|
||||
return self.r * 0x10000 + self.g * 0x100 + self.b
|
||||
end
|
||||
|
||||
colorspec_to_colorstring = minetest.colorspec_to_colorstring or function(spec)
|
||||
return colorspec.from_any(spec):to_string()
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user