diff options
author | Gael-de-Sailly <gael.chretien@akeonet.com> | 2015-02-27 20:51:55 +0100 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2017-06-22 03:11:50 +0100 |
commit | bc53c82bcf923d11725e3de8565eb4c7e435cd2b (patch) | |
tree | 9766b64f87b569033291ebb799c26d68512c074c /doc/lua_api.txt | |
parent | 1425c6def156840b359b90b4f32b9c7b8f005731 (diff) | |
download | hax-minetest-server-bc53c82bcf923d11725e3de8565eb4c7e435cd2b.tar.gz hax-minetest-server-bc53c82bcf923d11725e3de8565eb4c7e435cd2b.zip |
Add minetest.rgba function that returns ColorString from RGBA or RGB values
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r-- | doc/lua_api.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 9bd92b34a..664ad960a 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -580,7 +580,7 @@ Example (colored grass block): description = "Dirt with Grass", -- Regular tiles, as usual -- The dirt tile disables palette coloring - tiles = {{name = "default_grass.png"}, + tiles = {{name = "default_grass.png"}, {name = "default_dirt.png", color = "white"}}, -- Overlay tiles: define them in the same style -- The top and bottom tile does not have overlay @@ -2958,6 +2958,10 @@ These functions return the leftover itemstack. * See documentation on `minetest.compress()` for supported compression methods. * currently supported. * `...` indicates method-specific arguments. Currently, no methods use this. +* `minetest.rgba(red, green, blue[, alpha])`: returns a string + * Each argument is a 8 Bit unsigned integer + * Returns the ColorString from rgb or rgba values + * Example: `minetest.rgba(10, 20, 30, 40)`, returns `"#0A141E28"` * `minetest.encode_base64(string)`: returns string encoded in base64 * Encodes a string in base64. * `minetest.decode_base64(string)`: returns string |