diff options
author | Vincent Robinson <robinsonvincent89@gmail.com> | 2021-04-23 12:37:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-23 21:37:24 +0200 |
commit | 074e6a67def42ab9c91b8638c914869d516a9cd7 (patch) | |
tree | 1e8b9e20dc6ee5ef4ce8482bb762b89751538e28 /doc/client_lua_api.txt | |
parent | 3e2145d662d26443e96ac7191eda093c85c6f2bc (diff) | |
download | minetest-074e6a67def42ab9c91b8638c914869d516a9cd7.tar.gz minetest-074e6a67def42ab9c91b8638c914869d516a9cd7.tar.bz2 minetest-074e6a67def42ab9c91b8638c914869d516a9cd7.zip |
Add `minetest.colorspec_to_colorstring` (#10425)
Diffstat (limited to 'doc/client_lua_api.txt')
-rw-r--r-- | doc/client_lua_api.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/client_lua_api.txt b/doc/client_lua_api.txt index c2c552440..1e8015f7b 100644 --- a/doc/client_lua_api.txt +++ b/doc/client_lua_api.txt @@ -651,6 +651,9 @@ Minetest namespace reference * `minetest.sha1(data, [raw])`: returns the sha1 hash of data * `data`: string of data to hash * `raw`: return raw bytes instead of hex digits, default: false +* `minetest.colorspec_to_colorstring(colorspec)`: Converts a ColorSpec to a + ColorString. If the ColorSpec is invalid, returns `nil`. + * `colorspec`: The ColorSpec to convert * `minetest.get_csm_restrictions()`: returns a table of `Flags` indicating the restrictions applied to the current mod. * If a flag in this table is set to true, the feature is RESTRICTED. @@ -1348,9 +1351,8 @@ The following functions provide escape sequences: Named colors are also supported and are equivalent to [CSS Color Module Level 4](http://dev.w3.org/csswg/css-color/#named-colors). -To specify the value of the alpha channel, append `#AA` to the end of the color name -(e.g. `colorname#08`). For named colors the hexadecimal string representing the alpha -value must (always) be two hexadecimal digits. +To specify the value of the alpha channel, append `#A` or `#AA` to the end of +the color name (e.g. `colorname#08`). `Color` ------------- |