minetest.colorize

From Minetest Developer Wiki
Jump to: navigation, search

Contents

Syntax

minetest.colorize(color, text)

Description

Adds color escape sequence around the given text, allowing to send colored text to formspecs (maybe more).

Parameters

1: colorstring of the desired color (#RGB, #RGBA, #RRGGBB, #RRGGBBAA or named color according to CSS colors)

2: text to color

Examples

local my_label = "label[1,1;Test " .. minetest.colorize("#EE0", "colored") .. "]"
Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox