mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add functions to strip color information. (#5472)
This commit is contained in:
parent
1b299b4039
commit
81c3dc32a8
3 changed files with 26 additions and 1 deletions
|
@ -818,6 +818,12 @@ The following functions provide escape sequences:
|
|||
* `color` is a ColorString
|
||||
* The escape sequence sets the background of the whole text element to
|
||||
`color`. Only defined for item descriptions and tooltips.
|
||||
* `color.strip_foreground_colors(str)`
|
||||
* Removes foreground colors added by `get_color_escape_sequence`.
|
||||
* `color.strip_background_colors(str)`
|
||||
* Removes background colors added by `get_background_escape_sequence`.
|
||||
* `color.strip_colors(str)`
|
||||
* Removes all color escape sequences.
|
||||
|
||||
`ColorString`
|
||||
-------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue